From 284b436d5ae1565211f7c8292e54ff2563a94b13 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:45:16 -0700 Subject: [PATCH 1/8] docs: [parallelstore] minor documentation formatting fix for Parallelstore (#5734) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: minor documentation formatting fix for Parallelstore PiperOrigin-RevId: 681948084 Source-Link: https://github.com/googleapis/googleapis/commit/3708fdf26f073ba5cb83c3f3a3778f701c80458d Source-Link: https://github.com/googleapis/googleapis-gen/commit/1a535dedd7a34b71f1aa1afdcb9f458594772c60 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXBhcmFsbGVsc3RvcmUvLk93bEJvdC55YW1sIiwiaCI6IjFhNTM1ZGVkZDdhMzRiNzFmMWFhMWFmZGNiOWY0NTg1OTQ3NzJjNjAifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../google/cloud/parallelstore/v1/parallelstore.proto | 8 ++++---- .../google/cloud/parallelstore/v1beta/parallelstore.proto | 4 ++-- .../samples/generated/v1/parallelstore.export_data.js | 4 ++-- .../samples/generated/v1/parallelstore.import_data.js | 4 ++-- .../samples/generated/v1beta/parallelstore.export_data.js | 2 +- .../samples/generated/v1beta/parallelstore.import_data.js | 2 +- .../src/v1/parallelstore_client.ts | 8 ++++---- .../src/v1beta/parallelstore_client.ts | 4 ++-- 8 files changed, 18 insertions(+), 18 deletions(-) diff --git a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1/parallelstore.proto b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1/parallelstore.proto index d64ee625ec7..3253e1c280b 100644 --- a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1/parallelstore.proto +++ b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1/parallelstore.proto @@ -561,9 +561,9 @@ message ImportDataRequest { // // Use one of the following formats: // - // * {EMAIL_ADDRESS_OR_UNIQUE_ID} + // * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` // * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` // // If unspecified, the Parallelstore service agent is used: // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` @@ -619,9 +619,9 @@ message ExportDataRequest { // performing the transfer. // Use one of the following formats: // - // * {EMAIL_ADDRESS_OR_UNIQUE_ID} + // * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` // * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` // // If unspecified, the Parallelstore service agent is used: // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` diff --git a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto index eea968c1a4e..841751ef145 100644 --- a/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto +++ b/packages/google-cloud-parallelstore/protos/google/cloud/parallelstore/v1beta/parallelstore.proto @@ -563,7 +563,7 @@ message ImportDataRequest { // // * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` // * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` // // If unspecified, the Parallelstore service agent is used: // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` @@ -621,7 +621,7 @@ message ExportDataRequest { // // * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` // * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + // * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` // // If unspecified, the Parallelstore service agent is used: // `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` diff --git a/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.export_data.js b/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.export_data.js index 7eeaf685fa9..c5bc2eaf498 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.export_data.js +++ b/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.export_data.js @@ -58,9 +58,9 @@ function main(name) { * Optional. User-specified Service Account (SA) credentials to be used when * performing the transfer. * Use one of the following formats: - * * {EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` */ diff --git a/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.import_data.js b/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.import_data.js index f2032b01cf4..6a724ceb351 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.import_data.js +++ b/packages/google-cloud-parallelstore/samples/generated/v1/parallelstore.import_data.js @@ -58,9 +58,9 @@ function main(name) { * Optional. User-specified service account credentials to be used when * performing the transfer. * Use one of the following formats: - * * {EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` */ diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js index a9adf8a0b8b..1897685e201 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.export_data.js @@ -60,7 +60,7 @@ function main(name) { * Use one of the following formats: * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` */ diff --git a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js index 5e8a630a18a..ac423afa592 100644 --- a/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js +++ b/packages/google-cloud-parallelstore/samples/generated/v1beta/parallelstore.import_data.js @@ -60,7 +60,7 @@ function main(name) { * Use one of the following formats: * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` */ diff --git a/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts b/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts index e40ace0f42a..e732cd81df1 100644 --- a/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts +++ b/packages/google-cloud-parallelstore/src/v1/parallelstore_client.ts @@ -1118,9 +1118,9 @@ export class ParallelstoreClient { * * Use one of the following formats: * - * * {EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` @@ -1283,9 +1283,9 @@ export class ParallelstoreClient { * performing the transfer. * Use one of the following formats: * - * * {EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` diff --git a/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts b/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts index 4fa2a2ecb4b..bc4f40170a4 100644 --- a/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts +++ b/packages/google-cloud-parallelstore/src/v1beta/parallelstore_client.ts @@ -1120,7 +1120,7 @@ export class ParallelstoreClient { * * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` @@ -1285,7 +1285,7 @@ export class ParallelstoreClient { * * * `{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * `projects/{PROJECT_ID_OR_NUMBER}/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` - * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID} + * * `projects/-/serviceAccounts/{EMAIL_ADDRESS_OR_UNIQUE_ID}` * * If unspecified, the Parallelstore service agent is used: * `service-@gcp-sa-parallelstore.iam.gserviceaccount.com` From 05a5acff50e5fe8cf9d1806dee652d522c88a206 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:45:36 -0700 Subject: [PATCH 2/8] feat: [documentai] Removed deprecated api versions (#5735) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Removed deprecated api versions PiperOrigin-RevId: 681956159 Source-Link: https://github.com/googleapis/googleapis/commit/ff4436beeb10715bedeb54da24f87a3b4dcddcea Source-Link: https://github.com/googleapis/googleapis-gen/commit/1b41353956190b52884e5bcc7eceda2b9a92f756 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWRvY3VtZW50YWkvLk93bEJvdC55YW1sIiwiaCI6IjFiNDEzNTM5NTYxOTBiNTI4ODRlNWJjYzdlY2VkYTJiOWE5MmY3NTYifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- packages/google-cloud-documentai/README.md | 4 ++-- packages/google-cloud-documentai/protos/protos.json | 3 +++ 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/packages/google-cloud-documentai/README.md b/packages/google-cloud-documentai/README.md index fe8ddc3b205..5bff8d52396 100644 --- a/packages/google-cloud-documentai/README.md +++ b/packages/google-cloud-documentai/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Document AI API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -260,4 +260,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [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=documentai.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-documentai/protos/protos.json b/packages/google-cloud-documentai/protos/protos.json index a311c442444..464ef59c0d2 100644 --- a/packages/google-cloud-documentai/protos/protos.json +++ b/packages/google-cloud-documentai/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { From d0c0db86f34912a0015bc368e2e1299a8dfc2cb8 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:45:58 -0700 Subject: [PATCH 3/8] feat: [cloudcommerceconsumerprocurement] add Order modification RPCs and License Management Service (#5737) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add Order modification RPCs and License Management Service docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_APPROVED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_COMPLETED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_REJECTED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_ABANDONED` in enum `LineItemChangeState` is changed docs: A comment for enum value `LINE_ITEM_CHANGE_STATE_ACTIVATING` in enum `LineItemChangeState` is changed docs: A comment for field `request_id` in message `.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest` is changed docs: A comment for field `filter` in message `.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest` is changed PiperOrigin-RevId: 682457622 Source-Link: https://github.com/googleapis/googleapis/commit/1f8352cf46df74d7db6fd544181655c590689b8c Source-Link: https://github.com/googleapis/googleapis-gen/commit/172720068f2259b365a56a22a0c7c2a6d446c732 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbW1lcmNlLWNvbnN1bWVyLXByb2N1cmVtZW50Ly5Pd2xCb3QueWFtbCIsImgiOiIxNzI3MjAwNjhmMjI1OWIzNjVhNTZhMjJhMGM3YzJhNmQ0NDZjNzMyIn0= * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 11 +- .../v1/license_management_service.proto | 227 + .../consumer/procurement/v1/order.proto | 24 +- .../procurement/v1/procurement_service.proto | 132 +- .../protos/protos.d.ts | 4932 ++-- .../protos/protos.js | 20505 ++++++++++------ .../protos/protos.json | 752 +- .../samples/README.md | 126 + ...nsumer_procurement_service.cancel_order.js | 72 + ...nsumer_procurement_service.modify_order.js | 79 + ...onsumer_procurement_service.place_order.js | 2 +- .../v1/license_management_service.assign.js | 67 + ...gement_service.enumerate_licensed_users.js | 73 + ...nse_management_service.get_license_pool.js | 62 + .../v1/license_management_service.unassign.js | 67 + ..._management_service.update_license_pool.js | 69 + ...loud.commerce.consumer.procurement.v1.json | 320 + .../src/index.ts | 16 +- .../v1/consumer_procurement_service_client.ts | 362 +- ...mer_procurement_service_client_config.json | 8 + ...nsumer_procurement_service_proto_list.json | 1 + .../src/v1/gapic_metadata.json | 88 + .../src/v1/index.ts | 1 + .../v1/license_management_service_client.ts | 1081 + ...ense_management_service_client_config.json | 46 + ...license_management_service_proto_list.json | 5 + .../system-test/fixtures/sample/src/index.js | 2 + .../system-test/fixtures/sample/src/index.ts | 13 +- .../gapic_consumer_procurement_service_v1.ts | 471 + .../gapic_license_management_service_v1.ts | 1349 + 30 files changed, 21523 insertions(+), 9440 deletions(-) create mode 100644 packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/license_management_service.proto create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js create mode 100644 packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts create mode 100644 packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client_config.json create mode 100644 packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_proto_list.json create mode 100644 packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts diff --git a/packages/google-cloud-commerce-consumer-procurement/README.md b/packages/google-cloud-commerce-consumer-procurement/README.md index 68140970a80..4639d4f3848 100644 --- a/packages/google-cloud-commerce-consumer-procurement/README.md +++ b/packages/google-cloud-commerce-consumer-procurement/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Commerce Consumer Procurement API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -125,9 +125,16 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Sample | Source Code | Try it | | --------------------------- | --------------------------------- | ------ | +| Consumer_procurement_service.cancel_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | | Consumer_procurement_service.get_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.get_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.get_order.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | | Consumer_procurement_service.list_orders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.list_orders.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.list_orders.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | +| Consumer_procurement_service.modify_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | | Consumer_procurement_service.place_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | +| License_management_service.assign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | +| License_management_service.enumerate_licensed_users | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | +| License_management_service.get_license_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | +| License_management_service.unassign | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | +| License_management_service.update_license_pool | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | | Consumer_procurement_service.get_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.get_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.get_order.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | | Consumer_procurement_service.list_orders | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.list_orders.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.list_orders.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | | Consumer_procurement_service.place_order | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.place_order.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.place_order.js,packages/google-cloud-commerce-consumer-procurement/samples/README.md) | @@ -201,4 +208,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [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=cloudcommerceconsumerprocurement.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/license_management_service.proto b/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/license_management_service.proto new file mode 100644 index 00000000000..ae717496688 --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/license_management_service.proto @@ -0,0 +1,227 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +syntax = "proto3"; + +package google.cloud.commerce.consumer.procurement.v1; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/protobuf/duration.proto"; +import "google/protobuf/field_mask.proto"; +import "google/protobuf/timestamp.proto"; + +option csharp_namespace = "Google.Cloud.Commerce.Consumer.Procurement.V1"; +option go_package = "cloud.google.com/go/commerce/consumer/procurement/apiv1/procurementpb;procurementpb"; +option java_multiple_files = true; +option java_outer_classname = "LicenseManagementServiceProto"; +option java_package = "com.google.cloud.commerce.consumer.procurement.v1"; +option php_namespace = "Google\\Cloud\\Commerce\\Consumer\\Procurement\\V1"; +option ruby_package = "Google::Cloud::Commerce::Consumer::Procurement::V1"; + +// Service for managing licenses. +service LicenseManagementService { + option (google.api.default_host) = + "cloudcommerceconsumerprocurement.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/cloud-platform"; + + // Gets the license pool. + rpc GetLicensePool(GetLicensePoolRequest) returns (LicensePool) { + option (google.api.http) = { + get: "/v1/{name=billingAccounts/*/orders/*/licensePool}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the license pool if one exists for this Order. + rpc UpdateLicensePool(UpdateLicensePoolRequest) returns (LicensePool) { + option (google.api.http) = { + patch: "/v1/{license_pool.name=billingAccounts/*/orders/*/licensePool/*}" + body: "license_pool" + }; + option (google.api.method_signature) = "license_pool,update_mask"; + } + + // Assigns a license to a user. + rpc Assign(AssignRequest) returns (AssignResponse) { + option (google.api.http) = { + post: "/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign" + body: "*" + }; + option (google.api.method_signature) = "parent,usernames"; + } + + // Unassigns a license from a user. + rpc Unassign(UnassignRequest) returns (UnassignResponse) { + option (google.api.http) = { + post: "/v1/{parent=billingAccounts/*/orders/*/licensePool}:unassign" + body: "*" + }; + option (google.api.method_signature) = "parent,usernames"; + } + + // Enumerates all users assigned a license. + rpc EnumerateLicensedUsers(EnumerateLicensedUsersRequest) + returns (EnumerateLicensedUsersResponse) { + option (google.api.http) = { + get: "/v1/{parent=billingAccounts/*/orders/*/licensePool}:enumerateLicensedUsers" + }; + option (google.api.method_signature) = "parent"; + } +} + +// Assignment protocol for a license pool. +message AssignmentProtocol { + // Allow manual assignments triggered by administrative operations only. + message ManualAssignmentType {} + + // Configuration for automatic assignments handled by data plane operations. + message AutoAssignmentType { + // Optional. The time to live for an inactive license. After this time has + // passed, the license will be automatically unassigned from the user. Must + // be at least 7 days, if set. If unset, the license will never expire. + google.protobuf.Duration inactive_license_ttl = 1 + [(google.api.field_behavior) = OPTIONAL]; + } + + // The type of assignment protocol. + oneof assignment_type { + // Allow manual assignments triggered by administrative operations only. + ManualAssignmentType manual_assignment_type = 2; + + // Allow automatic assignments triggered by data plane operations. + AutoAssignmentType auto_assignment_type = 3; + } +} + +// A license pool represents a pool of licenses that can be assigned to users. +message LicensePool { + option (google.api.resource) = { + type: "cloudcommerceconsumerprocurement.googleapis.com/LicensePool" + pattern: "billingAccounts/{billing_account}/orders/{order}/licensePool" + plural: "licensePools" + singular: "licensePool" + }; + + // Identifier. Format: + // `billingAccounts/{billing_account}/orders/{order}/licensePool` + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Assignment protocol for the license pool. + AssignmentProtocol license_assignment_protocol = 2 + [(google.api.field_behavior) = REQUIRED]; + + // Output only. Licenses count that are available to be assigned. + int32 available_license_count = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Total number of licenses in the pool. + int32 total_license_count = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Request message for getting a license pool. +message GetLicensePoolRequest { + // Required. The name of the license pool to get. + // Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + string name = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for updating a license pool. +message UpdateLicensePoolRequest { + // Required. The license pool to update. + // + // The license pool's name field is used to identify the license pool to + // update. Format: + // `billingAccounts/{billing_account}/orders/{order}/licensePool`. + LicensePool license_pool = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The list of fields to update. + google.protobuf.FieldMask update_mask = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for +// [LicenseManagementService.Assign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign]. +message AssignRequest { + // Required. License pool name. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Username. + // Format: `name@domain.com`. + repeated string usernames = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [LicenseManagementService.Assign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign]. +message AssignResponse {} + +// Request message for +// [LicenseManagementService.Unassign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign]. +message UnassignRequest { + // Required. License pool name. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Username. + // Format: `name@domain.com`. + repeated string usernames = 2 [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for +// [LicenseManagementService.Unassign][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign]. +message UnassignResponse {} + +// Request message for +// [LicenseManagementService.EnumerateLicensedUsers][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers]. +message EnumerateLicensedUsersRequest { + // Required. License pool name. + string parent = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The maximum number of users to return. The service may return + // fewer than this value. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous `EnumerateLicensedUsers` + // call. Provide this to retrieve the subsequent page. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// A licensed user. +message LicensedUser { + // Username. + // Format: `name@domain.com`. + string username = 1; + + // Output only. Timestamp when the license was assigned. + google.protobuf.Timestamp assign_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. Timestamp when the license was recently used. This may not be + // the most recent usage time, and will be updated regularly (within 24 + // hours). + google.protobuf.Timestamp recent_usage_time = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} + +// Response message for +// [LicenseManagementService.EnumerateLicensedUsers][google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers]. +message EnumerateLicensedUsersResponse { + // The list of licensed users. + repeated LicensedUser licensed_users = 1; + + // A token that can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} diff --git a/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/order.proto b/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/order.proto index fb952385862..7f6d528180b 100644 --- a/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/order.proto +++ b/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/order.proto @@ -55,28 +55,32 @@ enum LineItemChangeState { // Sentinel value. Do not use. LINE_ITEM_CHANGE_STATE_UNSPECIFIED = 0; - // Change is in this state when a change is initiated and waiting for - // partner approval. + // Change is in this state when a change is initiated and waiting for partner + // approval. This state is only applicable for pending change. LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL = 1; // Change is in this state after it's approved by the partner or auto-approved - // but before it takes effect. The change can be overwritten - // or cancelled depending on the new line item info property (pending Private - // Offer change cannot be cancelled and can only be overwritten by another - // Private Offer). + // but before it takes effect. The change can be overwritten or cancelled + // depending on the new line item info property (pending Private Offer change + // cannot be cancelled and can only be overwritten by another Private Offer). + // This state is only applicable for pending change. LINE_ITEM_CHANGE_STATE_APPROVED = 2; - // Change is in this state after it's been activated. + // Change is in this state after it's been activated. This state is only + // applicable for change in history. LINE_ITEM_CHANGE_STATE_COMPLETED = 3; - // Change is in this state if it was rejected by the partner. + // Change is in this state if it was rejected by the partner. This state is + // only applicable for change in history. LINE_ITEM_CHANGE_STATE_REJECTED = 4; - // Change is in this state if it was abandoned by the user. + // Change is in this state if it was abandoned by the user. This state is only + // applicable for change in history. LINE_ITEM_CHANGE_STATE_ABANDONED = 5; // Change is in this state if it's currently being provisioned downstream. The - // change can't be overwritten or cancelled when it's in this state. + // change can't be overwritten or cancelled when it's in this state. This + // state is only applicable for pending change. LINE_ITEM_CHANGE_STATE_ACTIVATING = 6; } diff --git a/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/procurement_service.proto b/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/procurement_service.proto index 2d78eabf382..d43d2721402 100644 --- a/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/procurement_service.proto +++ b/packages/google-cloud-commerce-consumer-procurement/protos/google/cloud/commerce/consumer/procurement/v1/procurement_service.proto @@ -85,6 +85,45 @@ service ConsumerProcurementService { }; option (google.api.method_signature) = "parent"; } + + // Modifies an existing + // [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource. + rpc ModifyOrder(ModifyOrderRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=billingAccounts/*/orders/*}:modify" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Order" + metadata_type: "ModifyOrderMetadata" + }; + } + + // Cancels an existing + // [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product + // procured in the Order will be cancelled. + rpc CancelOrder(CancelOrderRequest) returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=billingAccounts/*/orders/*}:cancel" + body: "*" + }; + option (google.longrunning.operation_info) = { + response_type: "Order" + metadata_type: "CancelOrderMetadata" + }; + } +} + +// Indicates the auto renewal behavior customer specifies on subscription. +enum AutoRenewalBehavior { + // If unspecified, the auto renewal behavior will follow the default config. + AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED = 0; + + // Auto Renewal will be enabled on subscription. + AUTO_RENEWAL_BEHAVIOR_ENABLE = 1; + + // Auto Renewal will be disabled on subscription. + AUTO_RENEWAL_BEHAVIOR_DISABLE = 2; } // Request message for @@ -109,7 +148,7 @@ message PlaceOrderRequest { // Optional. A unique identifier for this request. // The server will ignore subsequent requests that provide a duplicate request - // ID for at least 120 minutes after the first request. + // ID for at least 24 hours after the first request. // // The request ID must be a valid // [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). @@ -149,6 +188,7 @@ message ListOrdersRequest { // // * `display_name` // + // // If the query contains special characters other than letters, // underscore, or digits, the phrase must be quoted with double quotes. For // example, `display_name="foo:bar"`, where the display name needs to be @@ -169,3 +209,93 @@ message ListOrdersResponse { // The token for fetching the next page. string next_page_token = 2; } + +// Request message for +// [ConsumerProcurementService.ModifyOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder]. +message ModifyOrderRequest { + // Modifications to make on the order. + message Modification { + // Required. ID of the existing line item to make change to. + // Required when change type is + // [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE] or + // [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CANCEL]. + string line_item_id = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. Type of change to make. + LineItemChangeType change_type = 2 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The line item to update to. + // Required when change_type is + // [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_CREATE] or + // [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE]. + LineItemInfo new_line_item_info = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Auto renewal behavior of the subscription for the update. + // Applied when change_type is + // [LineItemChangeType.LINE_ITEM_CHANGE_TYPE_UPDATE]. Follows plan default + // config when this field is not specified. + AutoRenewalBehavior auto_renewal_behavior = 4 + [(google.api.field_behavior) = OPTIONAL]; + } + + // Required. Name of the order to update. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. Modifications for an existing Order created by an Offer. + // Required when Offer based Order is being modified, except for when going + // from an offer to a public plan. + repeated Modification modifications = 6 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Updated display name of the order, leave as empty if you do not + // want to update current display name. + string display_name = 5 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The weak etag, which can be optionally populated, of the order + // that this modify request is based on. Validation checking will only happen + // if the invoker supplies this field. + string etag = 4 [(google.api.field_behavior) = OPTIONAL]; +} + +// Message stored in the metadata field of the Operation returned by +// [ConsumerProcurementService.ModifyOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder]. +message ModifyOrderMetadata {} + +// Request message for +// [ConsumerProcurementService.CancelOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder]. +message CancelOrderRequest { + // Indicates the cancellation policy the customer uses to cancel the order. + enum CancellationPolicy { + // If unspecified, cancellation will try to cancel the order, if order + // cannot be immediately cancelled, auto renewal will be turned off. + // However, caller should avoid using the value as it will yield a + // non-deterministic result. This is still supported mainly to maintain + // existing integrated usages and ensure backwards compatibility. + CANCELLATION_POLICY_UNSPECIFIED = 0; + + // Request will cancel the whole order immediately, if order cannot be + // immediately cancelled, the request will fail. + CANCELLATION_POLICY_CANCEL_IMMEDIATELY = 1; + + // Request will cancel the auto renewal, if order is not subscription based, + // the request will fail. + CANCELLATION_POLICY_CANCEL_AT_TERM_END = 2; + } + + // Required. The resource name of the order. + string name = 1 [(google.api.field_behavior) = REQUIRED]; + + // Optional. The weak etag, which can be optionally populated, of the order + // that this cancel request is based on. Validation checking will only happen + // if the invoker supplies this field. + string etag = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Cancellation policy of this request. + CancellationPolicy cancellation_policy = 3 + [(google.api.field_behavior) = OPTIONAL]; +} + +// Message stored in the metadata field of the Operation returned by +// [ConsumerProcurementService.CancelOrder][google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder]. +message CancelOrderMetadata {} diff --git a/packages/google-cloud-commerce-consumer-procurement/protos/protos.d.ts b/packages/google-cloud-commerce-consumer-procurement/protos/protos.d.ts index c53d90058a1..f853373d459 100644 --- a/packages/google-cloud-commerce-consumer-procurement/protos/protos.d.ts +++ b/packages/google-cloud-commerce-consumer-procurement/protos/protos.d.ts @@ -32,1480 +32,1455 @@ export namespace google { /** Namespace v1. */ namespace v1 { - /** LineItemChangeType enum. */ - enum LineItemChangeType { - LINE_ITEM_CHANGE_TYPE_UNSPECIFIED = 0, - LINE_ITEM_CHANGE_TYPE_CREATE = 1, - LINE_ITEM_CHANGE_TYPE_UPDATE = 2, - LINE_ITEM_CHANGE_TYPE_CANCEL = 3, - LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION = 4 - } - - /** LineItemChangeState enum. */ - enum LineItemChangeState { - LINE_ITEM_CHANGE_STATE_UNSPECIFIED = 0, - LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL = 1, - LINE_ITEM_CHANGE_STATE_APPROVED = 2, - LINE_ITEM_CHANGE_STATE_COMPLETED = 3, - LINE_ITEM_CHANGE_STATE_REJECTED = 4, - LINE_ITEM_CHANGE_STATE_ABANDONED = 5, - LINE_ITEM_CHANGE_STATE_ACTIVATING = 6 - } - - /** LineItemChangeStateReasonType enum. */ - enum LineItemChangeStateReasonType { - LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED = 0, - LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED = 1, - LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED = 2, - LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED = 3 - } - - /** Properties of an Order. */ - interface IOrder { - - /** Order name */ - name?: (string|null); - - /** Order displayName */ - displayName?: (string|null); - - /** Order lineItems */ - lineItems?: (google.cloud.commerce.consumer.procurement.v1.ILineItem[]|null); - - /** Order cancelledLineItems */ - cancelledLineItems?: (google.cloud.commerce.consumer.procurement.v1.ILineItem[]|null); - - /** Order createTime */ - createTime?: (google.protobuf.ITimestamp|null); - - /** Order updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - - /** Order etag */ - etag?: (string|null); - } - - /** Represents an Order. */ - class Order implements IOrder { + /** Represents a LicenseManagementService */ + class LicenseManagementService extends $protobuf.rpc.Service { /** - * Constructs a new Order. - * @param [properties] Properties to set + * Constructs a new LicenseManagementService service. + * @param rpcImpl RPC implementation + * @param [requestDelimited=false] Whether requests are length-delimited + * @param [responseDelimited=false] Whether responses are length-delimited */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IOrder); - - /** Order name. */ - public name: string; + constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); - /** Order displayName. */ - public displayName: string; + /** + * Creates new LicenseManagementService 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): LicenseManagementService; - /** Order lineItems. */ - public lineItems: google.cloud.commerce.consumer.procurement.v1.ILineItem[]; + /** + * Calls GetLicensePool. + * @param request GetLicensePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LicensePool + */ + public getLicensePool(request: google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, callback: google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePoolCallback): void; - /** Order cancelledLineItems. */ - public cancelledLineItems: google.cloud.commerce.consumer.procurement.v1.ILineItem[]; + /** + * Calls GetLicensePool. + * @param request GetLicensePoolRequest message or plain object + * @returns Promise + */ + public getLicensePool(request: google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest): Promise; - /** Order createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Calls UpdateLicensePool. + * @param request UpdateLicensePoolRequest message or plain object + * @param callback Node-style callback called with the error, if any, and LicensePool + */ + public updateLicensePool(request: google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, callback: google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePoolCallback): void; - /** Order updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Calls UpdateLicensePool. + * @param request UpdateLicensePoolRequest message or plain object + * @returns Promise + */ + public updateLicensePool(request: google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest): Promise; - /** Order etag. */ - public etag: string; + /** + * Calls Assign. + * @param request AssignRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AssignResponse + */ + public assign(request: google.cloud.commerce.consumer.procurement.v1.IAssignRequest, callback: google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.AssignCallback): void; /** - * Creates a new Order instance using the specified properties. - * @param [properties] Properties to set - * @returns Order instance + * Calls Assign. + * @param request AssignRequest message or plain object + * @returns Promise */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IOrder): google.cloud.commerce.consumer.procurement.v1.Order; + public assign(request: google.cloud.commerce.consumer.procurement.v1.IAssignRequest): Promise; /** - * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. - * @param message Order message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls Unassign. + * @param request UnassignRequest message or plain object + * @param callback Node-style callback called with the error, if any, and UnassignResponse */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + public unassign(request: google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, callback: google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UnassignCallback): void; /** - * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. - * @param message Order message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer + * Calls Unassign. + * @param request UnassignRequest message or plain object + * @returns Promise */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + public unassign(request: google.cloud.commerce.consumer.procurement.v1.IUnassignRequest): Promise; /** - * Decodes an Order message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Order - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls EnumerateLicensedUsers. + * @param request EnumerateLicensedUsersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EnumerateLicensedUsersResponse */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Order; + public enumerateLicensedUsers(request: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, callback: google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsersCallback): void; /** - * Decodes an Order message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Order - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Calls EnumerateLicensedUsers. + * @param request EnumerateLicensedUsersRequest message or plain object + * @returns Promise */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Order; + public enumerateLicensedUsers(request: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest): Promise; + } + + namespace LicenseManagementService { /** - * Verifies an Order message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|getLicensePool}. + * @param error Error, if any + * @param [response] LicensePool */ - public static verify(message: { [k: string]: any }): (string|null); + type GetLicensePoolCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.LicensePool) => void; /** - * Creates an Order message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Order + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|updateLicensePool}. + * @param error Error, if any + * @param [response] LicensePool */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Order; + type UpdateLicensePoolCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.LicensePool) => void; /** - * Creates a plain object from an Order message. Also converts values to other types if specified. - * @param message Order - * @param [options] Conversion options - * @returns Plain object + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|assign}. + * @param error Error, if any + * @param [response] AssignResponse */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Order, options?: $protobuf.IConversionOptions): { [k: string]: any }; + type AssignCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.AssignResponse) => void; /** - * Converts this Order to JSON. - * @returns JSON object + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|unassign}. + * @param error Error, if any + * @param [response] UnassignResponse */ - public toJSON(): { [k: string]: any }; + type UnassignCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.UnassignResponse) => void; /** - * Gets the default type url for Order - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|enumerateLicensedUsers}. + * @param error Error, if any + * @param [response] EnumerateLicensedUsersResponse */ - public static getTypeUrl(typeUrlPrefix?: string): string; + type EnumerateLicensedUsersCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse) => void; } - /** Properties of a LineItem. */ - interface ILineItem { - - /** LineItem lineItemId */ - lineItemId?: (string|null); - - /** LineItem lineItemInfo */ - lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); + /** Properties of an AssignmentProtocol. */ + interface IAssignmentProtocol { - /** LineItem pendingChange */ - pendingChange?: (google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null); + /** AssignmentProtocol manualAssignmentType */ + manualAssignmentType?: (google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType|null); - /** LineItem changeHistory */ - changeHistory?: (google.cloud.commerce.consumer.procurement.v1.ILineItemChange[]|null); + /** AssignmentProtocol autoAssignmentType */ + autoAssignmentType?: (google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType|null); } - /** Represents a LineItem. */ - class LineItem implements ILineItem { + /** Represents an AssignmentProtocol. */ + class AssignmentProtocol implements IAssignmentProtocol { /** - * Constructs a new LineItem. + * Constructs a new AssignmentProtocol. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItem); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol); - /** LineItem lineItemId. */ - public lineItemId: string; - - /** LineItem lineItemInfo. */ - public lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); + /** AssignmentProtocol manualAssignmentType. */ + public manualAssignmentType?: (google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType|null); - /** LineItem pendingChange. */ - public pendingChange?: (google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null); + /** AssignmentProtocol autoAssignmentType. */ + public autoAssignmentType?: (google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType|null); - /** LineItem changeHistory. */ - public changeHistory: google.cloud.commerce.consumer.procurement.v1.ILineItemChange[]; + /** AssignmentProtocol assignmentType. */ + public assignmentType?: ("manualAssignmentType"|"autoAssignmentType"); /** - * Creates a new LineItem instance using the specified properties. + * Creates a new AssignmentProtocol instance using the specified properties. * @param [properties] Properties to set - * @returns LineItem instance + * @returns AssignmentProtocol instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItem): google.cloud.commerce.consumer.procurement.v1.LineItem; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol; /** - * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. - * @param message LineItem message or plain object to encode + * Encodes the specified AssignmentProtocol message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.verify|verify} messages. + * @param message AssignmentProtocol message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. - * @param message LineItem message or plain object to encode + * Encodes the specified AssignmentProtocol message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.verify|verify} messages. + * @param message AssignmentProtocol message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LineItem message from the specified reader or buffer. + * Decodes an AssignmentProtocol message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LineItem + * @returns AssignmentProtocol * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LineItem; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol; /** - * Decodes a LineItem message from the specified reader or buffer, length delimited. + * Decodes an AssignmentProtocol message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LineItem + * @returns AssignmentProtocol * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LineItem; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol; /** - * Verifies a LineItem message. + * Verifies an AssignmentProtocol message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LineItem message from a plain object. Also converts values to their respective internal types. + * Creates an AssignmentProtocol message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LineItem + * @returns AssignmentProtocol */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LineItem; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol; /** - * Creates a plain object from a LineItem message. Also converts values to other types if specified. - * @param message LineItem + * Creates a plain object from an AssignmentProtocol message. Also converts values to other types if specified. + * @param message AssignmentProtocol * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LineItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LineItem to JSON. + * Converts this AssignmentProtocol to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LineItem + * Gets the default type url for AssignmentProtocol * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LineItemChange. */ - interface ILineItemChange { - - /** LineItemChange changeId */ - changeId?: (string|null); + namespace AssignmentProtocol { - /** LineItemChange changeType */ - changeType?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|null); + /** Properties of a ManualAssignmentType. */ + interface IManualAssignmentType { + } - /** LineItemChange oldLineItemInfo */ - oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); + /** Represents a ManualAssignmentType. */ + class ManualAssignmentType implements IManualAssignmentType { - /** LineItemChange newLineItemInfo */ - newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); + /** + * Constructs a new ManualAssignmentType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType); - /** LineItemChange changeState */ - changeState?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|null); + /** + * Creates a new ManualAssignmentType instance using the specified properties. + * @param [properties] Properties to set + * @returns ManualAssignmentType instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType; - /** LineItemChange stateReason */ - stateReason?: (string|null); + /** + * Encodes the specified ManualAssignmentType message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.verify|verify} messages. + * @param message ManualAssignmentType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType, writer?: $protobuf.Writer): $protobuf.Writer; - /** LineItemChange changeStateReasonType */ - changeStateReasonType?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|null); + /** + * Encodes the specified ManualAssignmentType message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.verify|verify} messages. + * @param message ManualAssignmentType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType, writer?: $protobuf.Writer): $protobuf.Writer; - /** LineItemChange changeEffectiveTime */ - changeEffectiveTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a ManualAssignmentType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ManualAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType; - /** LineItemChange createTime */ - createTime?: (google.protobuf.ITimestamp|null); + /** + * Decodes a ManualAssignmentType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ManualAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType; - /** LineItemChange updateTime */ - updateTime?: (google.protobuf.ITimestamp|null); - } + /** + * Verifies a ManualAssignmentType message. + * @param message 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 LineItemChange. */ - class LineItemChange implements ILineItemChange { + /** + * Creates a ManualAssignmentType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ManualAssignmentType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType; - /** - * Constructs a new LineItemChange. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemChange); + /** + * Creates a plain object from a ManualAssignmentType message. Also converts values to other types if specified. + * @param message ManualAssignmentType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** LineItemChange changeId. */ - public changeId: string; + /** + * Converts this ManualAssignmentType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** LineItemChange changeType. */ - public changeType: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeType); + /** + * Gets the default type url for ManualAssignmentType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** LineItemChange oldLineItemInfo. */ - public oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); + /** Properties of an AutoAssignmentType. */ + interface IAutoAssignmentType { - /** LineItemChange newLineItemInfo. */ - public newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); + /** AutoAssignmentType inactiveLicenseTtl */ + inactiveLicenseTtl?: (google.protobuf.IDuration|null); + } - /** LineItemChange changeState. */ - public changeState: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeState); + /** Represents an AutoAssignmentType. */ + class AutoAssignmentType implements IAutoAssignmentType { - /** LineItemChange stateReason. */ - public stateReason: string; + /** + * Constructs a new AutoAssignmentType. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType); - /** LineItemChange changeStateReasonType. */ - public changeStateReasonType: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType); + /** AutoAssignmentType inactiveLicenseTtl. */ + public inactiveLicenseTtl?: (google.protobuf.IDuration|null); - /** LineItemChange changeEffectiveTime. */ - public changeEffectiveTime?: (google.protobuf.ITimestamp|null); + /** + * Creates a new AutoAssignmentType instance using the specified properties. + * @param [properties] Properties to set + * @returns AutoAssignmentType instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType; - /** LineItemChange createTime. */ - public createTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified AutoAssignmentType message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.verify|verify} messages. + * @param message AutoAssignmentType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType, writer?: $protobuf.Writer): $protobuf.Writer; - /** LineItemChange updateTime. */ - public updateTime?: (google.protobuf.ITimestamp|null); + /** + * Encodes the specified AutoAssignmentType message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.verify|verify} messages. + * @param message AutoAssignmentType message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AutoAssignmentType message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AutoAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType; + + /** + * Decodes an AutoAssignmentType message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AutoAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType; + + /** + * Verifies an AutoAssignmentType message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AutoAssignmentType message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AutoAssignmentType + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType; + + /** + * Creates a plain object from an AutoAssignmentType message. Also converts values to other types if specified. + * @param message AutoAssignmentType + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AutoAssignmentType to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AutoAssignmentType + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a LicensePool. */ + interface ILicensePool { + + /** LicensePool name */ + name?: (string|null); + + /** LicensePool licenseAssignmentProtocol */ + licenseAssignmentProtocol?: (google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol|null); + + /** LicensePool availableLicenseCount */ + availableLicenseCount?: (number|null); + + /** LicensePool totalLicenseCount */ + totalLicenseCount?: (number|null); + } + + /** Represents a LicensePool. */ + class LicensePool implements ILicensePool { /** - * Creates a new LineItemChange instance using the specified properties. + * Constructs a new LicensePool. * @param [properties] Properties to set - * @returns LineItemChange instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemChange): google.cloud.commerce.consumer.procurement.v1.LineItemChange; + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILicensePool); + + /** LicensePool name. */ + public name: string; + + /** LicensePool licenseAssignmentProtocol. */ + public licenseAssignmentProtocol?: (google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol|null); + + /** LicensePool availableLicenseCount. */ + public availableLicenseCount: number; + + /** LicensePool totalLicenseCount. */ + public totalLicenseCount: number; /** - * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. - * @param message LineItemChange message or plain object to encode + * Creates a new LicensePool instance using the specified properties. + * @param [properties] Properties to set + * @returns LicensePool instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILicensePool): google.cloud.commerce.consumer.procurement.v1.LicensePool; + + /** + * Encodes the specified LicensePool message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensePool.verify|verify} messages. + * @param message LicensePool message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILicensePool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. - * @param message LineItemChange message or plain object to encode + * Encodes the specified LicensePool message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensePool.verify|verify} messages. + * @param message LicensePool message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILicensePool, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LineItemChange message from the specified reader or buffer. + * Decodes a LicensePool message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LineItemChange + * @returns LicensePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LineItemChange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LicensePool; /** - * Decodes a LineItemChange message from the specified reader or buffer, length delimited. + * Decodes a LicensePool message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LineItemChange + * @returns LicensePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LineItemChange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LicensePool; /** - * Verifies a LineItemChange message. + * Verifies a LicensePool message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LineItemChange message from a plain object. Also converts values to their respective internal types. + * Creates a LicensePool message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LineItemChange + * @returns LicensePool */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LineItemChange; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LicensePool; /** - * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. - * @param message LineItemChange + * Creates a plain object from a LicensePool message. Also converts values to other types if specified. + * @param message LicensePool * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LineItemChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LicensePool, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LineItemChange to JSON. + * Converts this LicensePool to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LineItemChange + * Gets the default type url for LicensePool * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a LineItemInfo. */ - interface ILineItemInfo { - - /** LineItemInfo offer */ - offer?: (string|null); - - /** LineItemInfo parameters */ - parameters?: (google.cloud.commerce.consumer.procurement.v1.IParameter[]|null); + /** Properties of a GetLicensePoolRequest. */ + interface IGetLicensePoolRequest { - /** LineItemInfo subscription */ - subscription?: (google.cloud.commerce.consumer.procurement.v1.ISubscription|null); + /** GetLicensePoolRequest name */ + name?: (string|null); } - /** Represents a LineItemInfo. */ - class LineItemInfo implements ILineItemInfo { + /** Represents a GetLicensePoolRequest. */ + class GetLicensePoolRequest implements IGetLicensePoolRequest { /** - * Constructs a new LineItemInfo. + * Constructs a new GetLicensePoolRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo); - - /** LineItemInfo offer. */ - public offer: string; - - /** LineItemInfo parameters. */ - public parameters: google.cloud.commerce.consumer.procurement.v1.IParameter[]; + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest); - /** LineItemInfo subscription. */ - public subscription?: (google.cloud.commerce.consumer.procurement.v1.ISubscription|null); + /** GetLicensePoolRequest name. */ + public name: string; /** - * Creates a new LineItemInfo instance using the specified properties. + * Creates a new GetLicensePoolRequest instance using the specified properties. * @param [properties] Properties to set - * @returns LineItemInfo instance + * @returns GetLicensePoolRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest): google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest; /** - * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. - * @param message LineItemInfo message or plain object to encode + * Encodes the specified GetLicensePoolRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest.verify|verify} messages. + * @param message GetLicensePoolRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. - * @param message LineItemInfo message or plain object to encode + * Encodes the specified GetLicensePoolRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest.verify|verify} messages. + * @param message GetLicensePoolRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a LineItemInfo message from the specified reader or buffer. + * Decodes a GetLicensePoolRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns LineItemInfo + * @returns GetLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest; /** - * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. + * Decodes a GetLicensePoolRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns LineItemInfo + * @returns GetLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest; /** - * Verifies a LineItemInfo message. + * Verifies a GetLicensePoolRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a LineItemInfo message from a plain object. Also converts values to their respective internal types. + * Creates a GetLicensePoolRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns LineItemInfo + * @returns GetLicensePoolRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest; /** - * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. - * @param message LineItemInfo + * Creates a plain object from a GetLicensePoolRequest message. Also converts values to other types if specified. + * @param message GetLicensePoolRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LineItemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this LineItemInfo to JSON. + * Converts this GetLicensePoolRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for LineItemInfo + * Gets the default type url for GetLicensePoolRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a Parameter. */ - interface IParameter { + /** Properties of an UpdateLicensePoolRequest. */ + interface IUpdateLicensePoolRequest { - /** Parameter name */ - name?: (string|null); + /** UpdateLicensePoolRequest licensePool */ + licensePool?: (google.cloud.commerce.consumer.procurement.v1.ILicensePool|null); - /** Parameter value */ - value?: (google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null); + /** UpdateLicensePoolRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a Parameter. */ - class Parameter implements IParameter { + /** Represents an UpdateLicensePoolRequest. */ + class UpdateLicensePoolRequest implements IUpdateLicensePoolRequest { /** - * Constructs a new Parameter. + * Constructs a new UpdateLicensePoolRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IParameter); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest); - /** Parameter name. */ - public name: string; + /** UpdateLicensePoolRequest licensePool. */ + public licensePool?: (google.cloud.commerce.consumer.procurement.v1.ILicensePool|null); - /** Parameter value. */ - public value?: (google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null); + /** UpdateLicensePoolRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new Parameter instance using the specified properties. + * Creates a new UpdateLicensePoolRequest instance using the specified properties. * @param [properties] Properties to set - * @returns Parameter instance + * @returns UpdateLicensePoolRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IParameter): google.cloud.commerce.consumer.procurement.v1.Parameter; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest): google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest; /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode + * Encodes the specified UpdateLicensePoolRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest.verify|verify} messages. + * @param message UpdateLicensePoolRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. - * @param message Parameter message or plain object to encode + * Encodes the specified UpdateLicensePoolRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest.verify|verify} messages. + * @param message UpdateLicensePoolRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Parameter message from the specified reader or buffer. + * Decodes an UpdateLicensePoolRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Parameter + * @returns UpdateLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Parameter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest; /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. + * Decodes an UpdateLicensePoolRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Parameter + * @returns UpdateLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Parameter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest; /** - * Verifies a Parameter message. + * Verifies an UpdateLicensePoolRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLicensePoolRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Parameter + * @returns UpdateLicensePoolRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Parameter; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest; /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. - * @param message Parameter + * Creates a plain object from an UpdateLicensePoolRequest message. Also converts values to other types if specified. + * @param message UpdateLicensePoolRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Parameter to JSON. + * Converts this UpdateLicensePoolRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Parameter + * Gets the default type url for UpdateLicensePoolRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace Parameter { + /** Properties of an AssignRequest. */ + interface IAssignRequest { - /** Properties of a Value. */ - interface IValue { + /** AssignRequest parent */ + parent?: (string|null); - /** Value int64Value */ - int64Value?: (number|Long|string|null); + /** AssignRequest usernames */ + usernames?: (string[]|null); + } - /** Value stringValue */ - stringValue?: (string|null); + /** Represents an AssignRequest. */ + class AssignRequest implements IAssignRequest { - /** Value doubleValue */ - doubleValue?: (number|null); - } + /** + * Constructs a new AssignRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IAssignRequest); - /** Represents a Value. */ - class Value implements IValue { + /** AssignRequest parent. */ + public parent: string; - /** - * Constructs a new Value. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue); + /** AssignRequest usernames. */ + public usernames: string[]; - /** Value int64Value. */ - public int64Value?: (number|Long|string|null); - - /** Value stringValue. */ - public stringValue?: (string|null); - - /** Value doubleValue. */ - public doubleValue?: (number|null); - - /** Value kind. */ - public kind?: ("int64Value"|"stringValue"|"doubleValue"); - - /** - * Creates a new Value instance using the specified properties. - * @param [properties] Properties to set - * @returns Value instance - */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; - - /** - * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. - * @param message Value message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; - - /** - * Decodes a Value message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; - - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @param reader Reader or buffer to decode from - * @returns Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; - - /** - * Verifies a Value message. - * @param message Plain object to verify - * @returns `null` if valid, otherwise the reason why it is not - */ - public static verify(message: { [k: string]: any }): (string|null); - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns Value - */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @param message Value - * @param [options] Conversion options - * @returns Plain object - */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Parameter.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; - - /** - * Converts this Value to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; - - /** - * Gets the default type url for Value - * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns The default type url - */ - public static getTypeUrl(typeUrlPrefix?: string): string; - } - } - - /** Properties of a Subscription. */ - interface ISubscription { - - /** Subscription startTime */ - startTime?: (google.protobuf.ITimestamp|null); - - /** Subscription endTime */ - endTime?: (google.protobuf.ITimestamp|null); - - /** Subscription autoRenewalEnabled */ - autoRenewalEnabled?: (boolean|null); - } - - /** Represents a Subscription. */ - class Subscription implements ISubscription { - - /** - * Constructs a new Subscription. - * @param [properties] Properties to set - */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ISubscription); - - /** Subscription startTime. */ - public startTime?: (google.protobuf.ITimestamp|null); - - /** Subscription endTime. */ - public endTime?: (google.protobuf.ITimestamp|null); - - /** Subscription autoRenewalEnabled. */ - public autoRenewalEnabled: boolean; - - /** - * Creates a new Subscription instance using the specified properties. - * @param [properties] Properties to set - * @returns Subscription instance - */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ISubscription): google.cloud.commerce.consumer.procurement.v1.Subscription; + /** + * Creates a new AssignRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns AssignRequest instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IAssignRequest): google.cloud.commerce.consumer.procurement.v1.AssignRequest; /** - * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. - * @param message Subscription message or plain object to encode + * Encodes the specified AssignRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignRequest.verify|verify} messages. + * @param message AssignRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IAssignRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. - * @param message Subscription message or plain object to encode + * Encodes the specified AssignRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignRequest.verify|verify} messages. + * @param message AssignRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IAssignRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Subscription message from the specified reader or buffer. + * Decodes an AssignRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Subscription + * @returns AssignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Subscription; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.AssignRequest; /** - * Decodes a Subscription message from the specified reader or buffer, length delimited. + * Decodes an AssignRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Subscription + * @returns AssignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Subscription; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.AssignRequest; /** - * Verifies a Subscription message. + * Verifies an AssignRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Subscription message from a plain object. Also converts values to their respective internal types. + * Creates an AssignRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Subscription + * @returns AssignRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Subscription; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.AssignRequest; /** - * Creates a plain object from a Subscription message. Also converts values to other types if specified. - * @param message Subscription + * Creates a plain object from an AssignRequest message. Also converts values to other types if specified. + * @param message AssignRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Subscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.AssignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Subscription to JSON. + * Converts this AssignRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Subscription + * Gets the default type url for AssignRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Represents a ConsumerProcurementService */ - class ConsumerProcurementService extends $protobuf.rpc.Service { + /** Properties of an AssignResponse. */ + interface IAssignResponse { + } + + /** Represents an AssignResponse. */ + class AssignResponse implements IAssignResponse { /** - * Constructs a new ConsumerProcurementService service. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited + * Constructs a new AssignResponse. + * @param [properties] Properties to set */ - constructor(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IAssignResponse); /** - * Creates new ConsumerProcurementService service using the specified rpc implementation. - * @param rpcImpl RPC implementation - * @param [requestDelimited=false] Whether requests are length-delimited - * @param [responseDelimited=false] Whether responses are length-delimited - * @returns RPC service. Useful where requests and/or responses are streamed. + * Creates a new AssignResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns AssignResponse instance */ - public static create(rpcImpl: $protobuf.RPCImpl, requestDelimited?: boolean, responseDelimited?: boolean): ConsumerProcurementService; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IAssignResponse): google.cloud.commerce.consumer.procurement.v1.AssignResponse; /** - * Calls PlaceOrder. - * @param request PlaceOrderRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Operation + * Encodes the specified AssignResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignResponse.verify|verify} messages. + * @param message AssignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public placeOrder(request: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.PlaceOrderCallback): void; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IAssignResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls PlaceOrder. - * @param request PlaceOrderRequest message or plain object - * @returns Promise + * Encodes the specified AssignResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignResponse.verify|verify} messages. + * @param message AssignResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer */ - public placeOrder(request: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest): Promise; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IAssignResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Calls GetOrder. - * @param request GetOrderRequest message or plain object - * @param callback Node-style callback called with the error, if any, and Order + * Decodes an AssignResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AssignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getOrder(request: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.GetOrderCallback): void; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.AssignResponse; /** - * Calls GetOrder. - * @param request GetOrderRequest message or plain object - * @returns Promise + * Decodes an AssignResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AssignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public getOrder(request: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest): Promise; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.AssignResponse; /** - * Calls ListOrders. - * @param request ListOrdersRequest message or plain object - * @param callback Node-style callback called with the error, if any, and ListOrdersResponse + * Verifies an AssignResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not */ - public listOrders(request: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ListOrdersCallback): void; + public static verify(message: { [k: string]: any }): (string|null); /** - * Calls ListOrders. - * @param request ListOrdersRequest message or plain object - * @returns Promise + * Creates an AssignResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AssignResponse */ - public listOrders(request: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest): Promise; - } - - namespace ConsumerProcurementService { + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.AssignResponse; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|placeOrder}. - * @param error Error, if any - * @param [response] Operation + * Creates a plain object from an AssignResponse message. Also converts values to other types if specified. + * @param message AssignResponse + * @param [options] Conversion options + * @returns Plain object */ - type PlaceOrderCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.AssignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|getOrder}. - * @param error Error, if any - * @param [response] Order + * Converts this AssignResponse to JSON. + * @returns JSON object */ - type GetOrderCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.Order) => void; + public toJSON(): { [k: string]: any }; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|listOrders}. - * @param error Error, if any - * @param [response] ListOrdersResponse + * Gets the default type url for AssignResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url */ - type ListOrdersCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse) => void; + public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PlaceOrderRequest. */ - interface IPlaceOrderRequest { + /** Properties of an UnassignRequest. */ + interface IUnassignRequest { - /** PlaceOrderRequest parent */ + /** UnassignRequest parent */ parent?: (string|null); - /** PlaceOrderRequest displayName */ - displayName?: (string|null); - - /** PlaceOrderRequest lineItemInfo */ - lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo[]|null); - - /** PlaceOrderRequest requestId */ - requestId?: (string|null); + /** UnassignRequest usernames */ + usernames?: (string[]|null); } - /** Represents a PlaceOrderRequest. */ - class PlaceOrderRequest implements IPlaceOrderRequest { + /** Represents an UnassignRequest. */ + class UnassignRequest implements IUnassignRequest { /** - * Constructs a new PlaceOrderRequest. + * Constructs a new UnassignRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IUnassignRequest); - /** PlaceOrderRequest parent. */ + /** UnassignRequest parent. */ public parent: string; - /** PlaceOrderRequest displayName. */ - public displayName: string; - - /** PlaceOrderRequest lineItemInfo. */ - public lineItemInfo: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo[]; - - /** PlaceOrderRequest requestId. */ - public requestId: string; + /** UnassignRequest usernames. */ + public usernames: string[]; /** - * Creates a new PlaceOrderRequest instance using the specified properties. + * Creates a new UnassignRequest instance using the specified properties. * @param [properties] Properties to set - * @returns PlaceOrderRequest instance + * @returns UnassignRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IUnassignRequest): google.cloud.commerce.consumer.procurement.v1.UnassignRequest; /** - * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. - * @param message PlaceOrderRequest message or plain object to encode + * Encodes the specified UnassignRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignRequest.verify|verify} messages. + * @param message UnassignRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. - * @param message PlaceOrderRequest message or plain object to encode + * Encodes the specified UnassignRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignRequest.verify|verify} messages. + * @param message UnassignRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlaceOrderRequest message from the specified reader or buffer. + * Decodes an UnassignRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlaceOrderRequest + * @returns UnassignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.UnassignRequest; /** - * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. + * Decodes an UnassignRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlaceOrderRequest + * @returns UnassignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.UnassignRequest; /** - * Verifies a PlaceOrderRequest message. + * Verifies an UnassignRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlaceOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UnassignRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlaceOrderRequest + * @returns UnassignRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.UnassignRequest; /** - * Creates a plain object from a PlaceOrderRequest message. Also converts values to other types if specified. - * @param message PlaceOrderRequest + * Creates a plain object from an UnassignRequest message. Also converts values to other types if specified. + * @param message UnassignRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.UnassignRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlaceOrderRequest to JSON. + * Converts this UnassignRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PlaceOrderRequest + * Gets the default type url for UnassignRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a PlaceOrderMetadata. */ - interface IPlaceOrderMetadata { + /** Properties of an UnassignResponse. */ + interface IUnassignResponse { } - /** Represents a PlaceOrderMetadata. */ - class PlaceOrderMetadata implements IPlaceOrderMetadata { + /** Represents an UnassignResponse. */ + class UnassignResponse implements IUnassignResponse { /** - * Constructs a new PlaceOrderMetadata. + * Constructs a new UnassignResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IUnassignResponse); /** - * Creates a new PlaceOrderMetadata instance using the specified properties. + * Creates a new UnassignResponse instance using the specified properties. * @param [properties] Properties to set - * @returns PlaceOrderMetadata instance + * @returns UnassignResponse instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IUnassignResponse): google.cloud.commerce.consumer.procurement.v1.UnassignResponse; /** - * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. - * @param message PlaceOrderMetadata message or plain object to encode + * Encodes the specified UnassignResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignResponse.verify|verify} messages. + * @param message UnassignResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. - * @param message PlaceOrderMetadata message or plain object to encode + * Encodes the specified UnassignResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignResponse.verify|verify} messages. + * @param message UnassignResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a PlaceOrderMetadata message from the specified reader or buffer. + * Decodes an UnassignResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns PlaceOrderMetadata + * @returns UnassignResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.UnassignResponse; /** - * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. + * Decodes an UnassignResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns PlaceOrderMetadata + * @returns UnassignResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.UnassignResponse; /** - * Verifies a PlaceOrderMetadata message. + * Verifies an UnassignResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a PlaceOrderMetadata message from a plain object. Also converts values to their respective internal types. + * Creates an UnassignResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns PlaceOrderMetadata + * @returns UnassignResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.UnassignResponse; /** - * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. - * @param message PlaceOrderMetadata + * Creates a plain object from an UnassignResponse message. Also converts values to other types if specified. + * @param message UnassignResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.UnassignResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this PlaceOrderMetadata to JSON. + * Converts this UnassignResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for PlaceOrderMetadata + * Gets the default type url for UnassignResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetOrderRequest. */ - interface IGetOrderRequest { + /** Properties of an EnumerateLicensedUsersRequest. */ + interface IEnumerateLicensedUsersRequest { - /** GetOrderRequest name */ - name?: (string|null); + /** EnumerateLicensedUsersRequest parent */ + parent?: (string|null); + + /** EnumerateLicensedUsersRequest pageSize */ + pageSize?: (number|null); + + /** EnumerateLicensedUsersRequest pageToken */ + pageToken?: (string|null); } - /** Represents a GetOrderRequest. */ - class GetOrderRequest implements IGetOrderRequest { + /** Represents an EnumerateLicensedUsersRequest. */ + class EnumerateLicensedUsersRequest implements IEnumerateLicensedUsersRequest { /** - * Constructs a new GetOrderRequest. + * Constructs a new EnumerateLicensedUsersRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest); - /** GetOrderRequest name. */ - public name: string; + /** EnumerateLicensedUsersRequest parent. */ + public parent: string; + + /** EnumerateLicensedUsersRequest pageSize. */ + public pageSize: number; + + /** EnumerateLicensedUsersRequest pageToken. */ + public pageToken: string; /** - * Creates a new GetOrderRequest instance using the specified properties. + * Creates a new EnumerateLicensedUsersRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetOrderRequest instance + * @returns EnumerateLicensedUsersRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest; /** - * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. - * @param message GetOrderRequest message or plain object to encode + * Encodes the specified EnumerateLicensedUsersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest.verify|verify} messages. + * @param message EnumerateLicensedUsersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. - * @param message GetOrderRequest message or plain object to encode + * Encodes the specified EnumerateLicensedUsersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest.verify|verify} messages. + * @param message EnumerateLicensedUsersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetOrderRequest message from the specified reader or buffer. + * Decodes an EnumerateLicensedUsersRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetOrderRequest + * @returns EnumerateLicensedUsersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest; /** - * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * Decodes an EnumerateLicensedUsersRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetOrderRequest + * @returns EnumerateLicensedUsersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest; /** - * Verifies a GetOrderRequest message. + * Verifies an EnumerateLicensedUsersRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EnumerateLicensedUsersRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetOrderRequest + * @returns EnumerateLicensedUsersRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest; /** - * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. - * @param message GetOrderRequest + * Creates a plain object from an EnumerateLicensedUsersRequest message. Also converts values to other types if specified. + * @param message EnumerateLicensedUsersRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.GetOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetOrderRequest to JSON. + * Converts this EnumerateLicensedUsersRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetOrderRequest + * Gets the default type url for EnumerateLicensedUsersRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOrdersRequest. */ - interface IListOrdersRequest { - - /** ListOrdersRequest parent */ - parent?: (string|null); + /** Properties of a LicensedUser. */ + interface ILicensedUser { - /** ListOrdersRequest pageSize */ - pageSize?: (number|null); + /** LicensedUser username */ + username?: (string|null); - /** ListOrdersRequest pageToken */ - pageToken?: (string|null); + /** LicensedUser assignTime */ + assignTime?: (google.protobuf.ITimestamp|null); - /** ListOrdersRequest filter */ - filter?: (string|null); + /** LicensedUser recentUsageTime */ + recentUsageTime?: (google.protobuf.ITimestamp|null); } - /** Represents a ListOrdersRequest. */ - class ListOrdersRequest implements IListOrdersRequest { + /** Represents a LicensedUser. */ + class LicensedUser implements ILicensedUser { /** - * Constructs a new ListOrdersRequest. + * Constructs a new LicensedUser. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest); - - /** ListOrdersRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILicensedUser); - /** ListOrdersRequest pageSize. */ - public pageSize: number; + /** LicensedUser username. */ + public username: string; - /** ListOrdersRequest pageToken. */ - public pageToken: string; + /** LicensedUser assignTime. */ + public assignTime?: (google.protobuf.ITimestamp|null); - /** ListOrdersRequest filter. */ - public filter: string; + /** LicensedUser recentUsageTime. */ + public recentUsageTime?: (google.protobuf.ITimestamp|null); /** - * Creates a new ListOrdersRequest instance using the specified properties. + * Creates a new LicensedUser instance using the specified properties. * @param [properties] Properties to set - * @returns ListOrdersRequest instance + * @returns LicensedUser instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILicensedUser): google.cloud.commerce.consumer.procurement.v1.LicensedUser; /** - * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. - * @param message ListOrdersRequest message or plain object to encode + * Encodes the specified LicensedUser message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensedUser.verify|verify} messages. + * @param message LicensedUser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILicensedUser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. - * @param message ListOrdersRequest message or plain object to encode + * Encodes the specified LicensedUser message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensedUser.verify|verify} messages. + * @param message LicensedUser message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILicensedUser, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer. + * Decodes a LicensedUser message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOrdersRequest + * @returns LicensedUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LicensedUser; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * Decodes a LicensedUser message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOrdersRequest + * @returns LicensedUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LicensedUser; /** - * Verifies a ListOrdersRequest message. + * Verifies a LicensedUser message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * Creates a LicensedUser message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOrdersRequest + * @returns LicensedUser */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LicensedUser; /** - * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. - * @param message ListOrdersRequest + * Creates a plain object from a LicensedUser message. Also converts values to other types if specified. + * @param message LicensedUser * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LicensedUser, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOrdersRequest to JSON. + * Converts this LicensedUser to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOrdersRequest + * Gets the default type url for LicensedUser * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListOrdersResponse. */ - interface IListOrdersResponse { + /** Properties of an EnumerateLicensedUsersResponse. */ + interface IEnumerateLicensedUsersResponse { - /** ListOrdersResponse orders */ - orders?: (google.cloud.commerce.consumer.procurement.v1.IOrder[]|null); + /** EnumerateLicensedUsersResponse licensedUsers */ + licensedUsers?: (google.cloud.commerce.consumer.procurement.v1.ILicensedUser[]|null); - /** ListOrdersResponse nextPageToken */ + /** EnumerateLicensedUsersResponse nextPageToken */ nextPageToken?: (string|null); } - /** Represents a ListOrdersResponse. */ - class ListOrdersResponse implements IListOrdersResponse { + /** Represents an EnumerateLicensedUsersResponse. */ + class EnumerateLicensedUsersResponse implements IEnumerateLicensedUsersResponse { /** - * Constructs a new ListOrdersResponse. + * Constructs a new EnumerateLicensedUsersResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse); - /** ListOrdersResponse orders. */ - public orders: google.cloud.commerce.consumer.procurement.v1.IOrder[]; + /** EnumerateLicensedUsersResponse licensedUsers. */ + public licensedUsers: google.cloud.commerce.consumer.procurement.v1.ILicensedUser[]; - /** ListOrdersResponse nextPageToken. */ + /** EnumerateLicensedUsersResponse nextPageToken. */ public nextPageToken: string; /** - * Creates a new ListOrdersResponse instance using the specified properties. + * Creates a new EnumerateLicensedUsersResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListOrdersResponse instance + * @returns EnumerateLicensedUsersResponse instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse; /** - * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. - * @param message ListOrdersResponse message or plain object to encode + * Encodes the specified EnumerateLicensedUsersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse.verify|verify} messages. + * @param message EnumerateLicensedUsersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. - * @param message ListOrdersResponse message or plain object to encode + * Encodes the specified EnumerateLicensedUsersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse.verify|verify} messages. + * @param message EnumerateLicensedUsersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListOrdersResponse message from the specified reader or buffer. + * Decodes an EnumerateLicensedUsersResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListOrdersResponse + * @returns EnumerateLicensedUsersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse; /** - * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * Decodes an EnumerateLicensedUsersResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListOrdersResponse + * @returns EnumerateLicensedUsersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse; /** - * Verifies a ListOrdersResponse message. + * Verifies an EnumerateLicensedUsersResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * Creates an EnumerateLicensedUsersResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListOrdersResponse + * @returns EnumerateLicensedUsersResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse; /** - * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. - * @param message ListOrdersResponse + * Creates a plain object from an EnumerateLicensedUsersResponse message. Also converts values to other types if specified. + * @param message EnumerateLicensedUsersResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListOrdersResponse to JSON. + * Converts this EnumerateLicensedUsersResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListOrdersResponse + * Gets the default type url for EnumerateLicensedUsersResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - - /** Namespace v1alpha1. */ - namespace v1alpha1 { /** LineItemChangeType enum. */ enum LineItemChangeType { @@ -1545,10 +1520,10 @@ export namespace google { displayName?: (string|null); /** Order lineItems */ - lineItems?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]|null); + lineItems?: (google.cloud.commerce.consumer.procurement.v1.ILineItem[]|null); /** Order cancelledLineItems */ - cancelledLineItems?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]|null); + cancelledLineItems?: (google.cloud.commerce.consumer.procurement.v1.ILineItem[]|null); /** Order createTime */ createTime?: (google.protobuf.ITimestamp|null); @@ -1567,7 +1542,7 @@ export namespace google { * Constructs a new Order. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IOrder); /** Order name. */ public name: string; @@ -1576,10 +1551,10 @@ export namespace google { public displayName: string; /** Order lineItems. */ - public lineItems: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]; + public lineItems: google.cloud.commerce.consumer.procurement.v1.ILineItem[]; /** Order cancelledLineItems. */ - public cancelledLineItems: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]; + public cancelledLineItems: google.cloud.commerce.consumer.procurement.v1.ILineItem[]; /** Order createTime. */ public createTime?: (google.protobuf.ITimestamp|null); @@ -1595,23 +1570,23 @@ export namespace google { * @param [properties] Properties to set * @returns Order instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IOrder): google.cloud.commerce.consumer.procurement.v1.Order; /** - * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. * @param message Order message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. * @param message Order message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes an Order message from the specified reader or buffer. @@ -1621,7 +1596,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Order; /** * Decodes an Order message from the specified reader or buffer, length delimited. @@ -1630,7 +1605,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Order; /** * Verifies an Order message. @@ -1644,7 +1619,7 @@ export namespace google { * @param object Plain object * @returns Order */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Order; /** * Creates a plain object from an Order message. Also converts values to other types if specified. @@ -1652,7 +1627,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Order, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Order, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Order to JSON. @@ -1675,13 +1650,13 @@ export namespace google { lineItemId?: (string|null); /** LineItem lineItemInfo */ - lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); /** LineItem pendingChange */ - pendingChange?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null); + pendingChange?: (google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null); /** LineItem changeHistory */ - changeHistory?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange[]|null); + changeHistory?: (google.cloud.commerce.consumer.procurement.v1.ILineItemChange[]|null); } /** Represents a LineItem. */ @@ -1691,42 +1666,42 @@ export namespace google { * Constructs a new LineItem. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItem); /** LineItem lineItemId. */ public lineItemId: string; /** LineItem lineItemInfo. */ - public lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + public lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); /** LineItem pendingChange. */ - public pendingChange?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null); + public pendingChange?: (google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null); /** LineItem changeHistory. */ - public changeHistory: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange[]; + public changeHistory: google.cloud.commerce.consumer.procurement.v1.ILineItemChange[]; /** * Creates a new LineItem instance using the specified properties. * @param [properties] Properties to set * @returns LineItem instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItem): google.cloud.commerce.consumer.procurement.v1.LineItem; /** - * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. * @param message LineItem message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. * @param message LineItem message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a LineItem message from the specified reader or buffer. @@ -1736,7 +1711,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LineItem; /** * Decodes a LineItem message from the specified reader or buffer, length delimited. @@ -1745,7 +1720,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LineItem; /** * Verifies a LineItem message. @@ -1759,7 +1734,7 @@ export namespace google { * @param object Plain object * @returns LineItem */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LineItem; /** * Creates a plain object from a LineItem message. Also converts values to other types if specified. @@ -1767,7 +1742,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.LineItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LineItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this LineItem to JSON. @@ -1790,22 +1765,22 @@ export namespace google { changeId?: (string|null); /** LineItemChange changeType */ - changeType?: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|null); + changeType?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|null); /** LineItemChange oldLineItemInfo */ - oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); /** LineItemChange newLineItemInfo */ - newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); /** LineItemChange changeState */ - changeState?: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|null); + changeState?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|null); /** LineItemChange stateReason */ stateReason?: (string|null); /** LineItemChange changeStateReasonType */ - changeStateReasonType?: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|null); + changeStateReasonType?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|null); /** LineItemChange changeEffectiveTime */ changeEffectiveTime?: (google.protobuf.ITimestamp|null); @@ -1824,28 +1799,28 @@ export namespace google { * Constructs a new LineItemChange. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemChange); /** LineItemChange changeId. */ public changeId: string; /** LineItemChange changeType. */ - public changeType: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType); + public changeType: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeType); /** LineItemChange oldLineItemInfo. */ - public oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + public oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); /** LineItemChange newLineItemInfo. */ - public newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + public newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); /** LineItemChange changeState. */ - public changeState: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState); + public changeState: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeState); /** LineItemChange stateReason. */ public stateReason: string; /** LineItemChange changeStateReasonType. */ - public changeStateReasonType: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType); + public changeStateReasonType: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType); /** LineItemChange changeEffectiveTime. */ public changeEffectiveTime?: (google.protobuf.ITimestamp|null); @@ -1861,23 +1836,23 @@ export namespace google { * @param [properties] Properties to set * @returns LineItemChange instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemChange): google.cloud.commerce.consumer.procurement.v1.LineItemChange; /** - * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. * @param message LineItemChange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. * @param message LineItemChange message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a LineItemChange message from the specified reader or buffer. @@ -1887,7 +1862,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LineItemChange; /** * Decodes a LineItemChange message from the specified reader or buffer, length delimited. @@ -1896,7 +1871,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LineItemChange; /** * Verifies a LineItemChange message. @@ -1910,7 +1885,7 @@ export namespace google { * @param object Plain object * @returns LineItemChange */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LineItemChange; /** * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. @@ -1918,7 +1893,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LineItemChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this LineItemChange to JSON. @@ -1941,10 +1916,10 @@ export namespace google { offer?: (string|null); /** LineItemInfo parameters */ - parameters?: (google.cloud.commerce.consumer.procurement.v1alpha1.IParameter[]|null); + parameters?: (google.cloud.commerce.consumer.procurement.v1.IParameter[]|null); /** LineItemInfo subscription */ - subscription?: (google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null); + subscription?: (google.cloud.commerce.consumer.procurement.v1.ISubscription|null); } /** Represents a LineItemInfo. */ @@ -1954,39 +1929,39 @@ export namespace google { * Constructs a new LineItemInfo. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo); /** LineItemInfo offer. */ public offer: string; /** LineItemInfo parameters. */ - public parameters: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter[]; + public parameters: google.cloud.commerce.consumer.procurement.v1.IParameter[]; /** LineItemInfo subscription. */ - public subscription?: (google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null); + public subscription?: (google.cloud.commerce.consumer.procurement.v1.ISubscription|null); /** * Creates a new LineItemInfo instance using the specified properties. * @param [properties] Properties to set * @returns LineItemInfo instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; /** - * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. + * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. * @param message LineItemInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. + * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. * @param message LineItemInfo message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a LineItemInfo message from the specified reader or buffer. @@ -1996,7 +1971,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; /** * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. @@ -2005,7 +1980,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; /** * Verifies a LineItemInfo message. @@ -2019,7 +1994,7 @@ export namespace google { * @param object Plain object * @returns LineItemInfo */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.LineItemInfo; /** * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. @@ -2027,7 +2002,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.LineItemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this LineItemInfo to JSON. @@ -2050,7 +2025,7 @@ export namespace google { name?: (string|null); /** Parameter value */ - value?: (google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null); + value?: (google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null); } /** Represents a Parameter. */ @@ -2060,36 +2035,36 @@ export namespace google { * Constructs a new Parameter. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IParameter); /** Parameter name. */ public name: string; /** Parameter value. */ - public value?: (google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null); + public value?: (google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null); /** * Creates a new Parameter instance using the specified properties. * @param [properties] Properties to set * @returns Parameter instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IParameter): google.cloud.commerce.consumer.procurement.v1.Parameter; /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. * @param message Parameter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. * @param message Parameter message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Parameter message from the specified reader or buffer. @@ -2099,7 +2074,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Parameter; /** * Decodes a Parameter message from the specified reader or buffer, length delimited. @@ -2108,7 +2083,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Parameter; /** * Verifies a Parameter message. @@ -2122,7 +2097,7 @@ export namespace google { * @param object Plain object * @returns Parameter */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Parameter; /** * Creates a plain object from a Parameter message. Also converts values to other types if specified. @@ -2130,7 +2105,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Parameter to JSON. @@ -2168,7 +2143,7 @@ export namespace google { * Constructs a new Value. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue); /** Value int64Value. */ public int64Value?: (number|Long|string|null); @@ -2187,23 +2162,23 @@ export namespace google { * @param [properties] Properties to set * @returns Value instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; /** - * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. + * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. * @param message Value message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Value message from the specified reader or buffer. @@ -2213,7 +2188,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; /** * Decodes a Value message from the specified reader or buffer, length delimited. @@ -2222,7 +2197,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; /** * Verifies a Value message. @@ -2236,7 +2211,7 @@ export namespace google { * @param object Plain object * @returns Value */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Parameter.Value; /** * Creates a plain object from a Value message. Also converts values to other types if specified. @@ -2244,7 +2219,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Parameter.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Value to JSON. @@ -2281,7 +2256,7 @@ export namespace google { * Constructs a new Subscription. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ISubscription); /** Subscription startTime. */ public startTime?: (google.protobuf.ITimestamp|null); @@ -2297,23 +2272,23 @@ export namespace google { * @param [properties] Properties to set * @returns Subscription instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ISubscription): google.cloud.commerce.consumer.procurement.v1.Subscription; /** - * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. * @param message Subscription message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. * @param message Subscription message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a Subscription message from the specified reader or buffer. @@ -2323,7 +2298,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.Subscription; /** * Decodes a Subscription message from the specified reader or buffer, length delimited. @@ -2332,7 +2307,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.Subscription; /** * Verifies a Subscription message. @@ -2346,7 +2321,7 @@ export namespace google { * @param object Plain object * @returns Subscription */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.Subscription; /** * Creates a plain object from a Subscription message. Also converts values to other types if specified. @@ -2354,7 +2329,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Subscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.Subscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this Subscription to JSON. @@ -2395,66 +2370,115 @@ export namespace google { * @param request PlaceOrderRequest message or plain object * @param callback Node-style callback called with the error, if any, and Operation */ - public placeOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.PlaceOrderCallback): void; + public placeOrder(request: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.PlaceOrderCallback): void; /** * Calls PlaceOrder. * @param request PlaceOrderRequest message or plain object * @returns Promise */ - public placeOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest): Promise; + public placeOrder(request: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest): Promise; /** * Calls GetOrder. * @param request GetOrderRequest message or plain object * @param callback Node-style callback called with the error, if any, and Order */ - public getOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.GetOrderCallback): void; + public getOrder(request: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.GetOrderCallback): void; /** * Calls GetOrder. * @param request GetOrderRequest message or plain object * @returns Promise */ - public getOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest): Promise; + public getOrder(request: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest): Promise; /** * Calls ListOrders. * @param request ListOrdersRequest message or plain object * @param callback Node-style callback called with the error, if any, and ListOrdersResponse */ - public listOrders(request: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, callback: google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.ListOrdersCallback): void; + public listOrders(request: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ListOrdersCallback): void; /** * Calls ListOrders. * @param request ListOrdersRequest message or plain object * @returns Promise */ - public listOrders(request: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest): Promise; + public listOrders(request: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest): Promise; + + /** + * Calls ModifyOrder. + * @param request ModifyOrderRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public modifyOrder(request: google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrderCallback): void; + + /** + * Calls ModifyOrder. + * @param request ModifyOrderRequest message or plain object + * @returns Promise + */ + public modifyOrder(request: google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest): Promise; + + /** + * Calls CancelOrder. + * @param request CancelOrderRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public cancelOrder(request: google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrderCallback): void; + + /** + * Calls CancelOrder. + * @param request CancelOrderRequest message or plain object + * @returns Promise + */ + public cancelOrder(request: google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest): Promise; } namespace ConsumerProcurementService { /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|placeOrder}. + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|placeOrder}. * @param error Error, if any * @param [response] Operation */ type PlaceOrderCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|getOrder}. + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|getOrder}. * @param error Error, if any * @param [response] Order */ - type GetOrderCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1alpha1.Order) => void; + type GetOrderCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.Order) => void; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|listOrders}. + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|listOrders}. * @param error Error, if any * @param [response] ListOrdersResponse */ - type ListOrdersCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse) => void; + type ListOrdersCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse) => void; + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|modifyOrder}. + * @param error Error, if any + * @param [response] Operation + */ + type ModifyOrderCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|cancelOrder}. + * @param error Error, if any + * @param [response] Operation + */ + type CancelOrderCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + } + + /** AutoRenewalBehavior enum. */ + enum AutoRenewalBehavior { + AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED = 0, + AUTO_RENEWAL_BEHAVIOR_ENABLE = 1, + AUTO_RENEWAL_BEHAVIOR_DISABLE = 2 } /** Properties of a PlaceOrderRequest. */ @@ -2467,7 +2491,7 @@ export namespace google { displayName?: (string|null); /** PlaceOrderRequest lineItemInfo */ - lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo[]|null); + lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo[]|null); /** PlaceOrderRequest requestId */ requestId?: (string|null); @@ -2480,7 +2504,7 @@ export namespace google { * Constructs a new PlaceOrderRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest); /** PlaceOrderRequest parent. */ public parent: string; @@ -2489,7 +2513,7 @@ export namespace google { public displayName: string; /** PlaceOrderRequest lineItemInfo. */ - public lineItemInfo: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo[]; + public lineItemInfo: google.cloud.commerce.consumer.procurement.v1.ILineItemInfo[]; /** PlaceOrderRequest requestId. */ public requestId: string; @@ -2499,23 +2523,23 @@ export namespace google { * @param [properties] Properties to set * @returns PlaceOrderRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; /** - * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. * @param message PlaceOrderRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. * @param message PlaceOrderRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PlaceOrderRequest message from the specified reader or buffer. @@ -2525,7 +2549,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; /** * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. @@ -2534,7 +2558,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; /** * Verifies a PlaceOrderRequest message. @@ -2548,7 +2572,7 @@ export namespace google { * @param object Plain object * @returns PlaceOrderRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest; /** * Creates a plain object from a PlaceOrderRequest message. Also converts values to other types if specified. @@ -2556,7 +2580,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PlaceOrderRequest to JSON. @@ -2583,30 +2607,30 @@ export namespace google { * Constructs a new PlaceOrderMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata); /** * Creates a new PlaceOrderMetadata instance using the specified properties. * @param [properties] Properties to set * @returns PlaceOrderMetadata instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; /** - * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. * @param message PlaceOrderMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. * @param message PlaceOrderMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a PlaceOrderMetadata message from the specified reader or buffer. @@ -2616,7 +2640,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; /** * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. @@ -2625,7 +2649,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; /** * Verifies a PlaceOrderMetadata message. @@ -2639,7 +2663,7 @@ export namespace google { * @param object Plain object * @returns PlaceOrderMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata; /** * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. @@ -2647,7 +2671,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this PlaceOrderMetadata to JSON. @@ -2677,7 +2701,7 @@ export namespace google { * Constructs a new GetOrderRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest); /** GetOrderRequest name. */ public name: string; @@ -2687,23 +2711,23 @@ export namespace google { * @param [properties] Properties to set * @returns GetOrderRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; /** - * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. + * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. * @param message GetOrderRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. + * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. * @param message GetOrderRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a GetOrderRequest message from the specified reader or buffer. @@ -2713,7 +2737,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; /** * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. @@ -2722,7 +2746,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; /** * Verifies a GetOrderRequest message. @@ -2736,7 +2760,7 @@ export namespace google { * @param object Plain object * @returns GetOrderRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.GetOrderRequest; /** * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. @@ -2744,7 +2768,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.GetOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this GetOrderRequest to JSON. @@ -2783,7 +2807,7 @@ export namespace google { * Constructs a new ListOrdersRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest); /** ListOrdersRequest parent. */ public parent: string; @@ -2802,23 +2826,23 @@ export namespace google { * @param [properties] Properties to set * @returns ListOrdersRequest instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; /** - * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. * @param message ListOrdersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. * @param message ListOrdersRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ListOrdersRequest message from the specified reader or buffer. @@ -2828,7 +2852,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; /** * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. @@ -2837,7 +2861,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; /** * Verifies a ListOrdersRequest message. @@ -2851,7 +2875,7 @@ export namespace google { * @param object Plain object * @returns ListOrdersRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest; /** * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. @@ -2859,7 +2883,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ListOrdersRequest to JSON. @@ -2879,7 +2903,7 @@ export namespace google { interface IListOrdersResponse { /** ListOrdersResponse orders */ - orders?: (google.cloud.commerce.consumer.procurement.v1alpha1.IOrder[]|null); + orders?: (google.cloud.commerce.consumer.procurement.v1.IOrder[]|null); /** ListOrdersResponse nextPageToken */ nextPageToken?: (string|null); @@ -2892,10 +2916,10 @@ export namespace google { * Constructs a new ListOrdersResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse); + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse); /** ListOrdersResponse orders. */ - public orders: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder[]; + public orders: google.cloud.commerce.consumer.procurement.v1.IOrder[]; /** ListOrdersResponse nextPageToken. */ public nextPageToken: string; @@ -2905,23 +2929,23 @@ export namespace google { * @param [properties] Properties to set * @returns ListOrdersResponse instance */ - public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; /** - * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. * @param message ListOrdersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. * @param message ListOrdersResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** * Decodes a ListOrdersResponse message from the specified reader or buffer. @@ -2931,7 +2955,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; /** * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. @@ -2940,7 +2964,7 @@ export namespace google { * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; /** * Verifies a ListOrdersResponse message. @@ -2954,7 +2978,7 @@ export namespace google { * @param object Plain object * @returns ListOrdersResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse; /** * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. @@ -2962,7 +2986,7 @@ export namespace google { * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** * Converts this ListOrdersResponse to JSON. @@ -2977,279 +3001,2023 @@ export namespace google { */ public static getTypeUrl(typeUrlPrefix?: string): string; } - } - } - } - } - } - - /** Namespace api. */ - namespace api { - /** FieldBehavior enum. */ - enum FieldBehavior { - FIELD_BEHAVIOR_UNSPECIFIED = 0, - OPTIONAL = 1, - REQUIRED = 2, - OUTPUT_ONLY = 3, - INPUT_ONLY = 4, - IMMUTABLE = 5, - UNORDERED_LIST = 6, - NON_EMPTY_DEFAULT = 7, - IDENTIFIER = 8 - } + /** Properties of a ModifyOrderRequest. */ + interface IModifyOrderRequest { - /** Properties of a ResourceDescriptor. */ - interface IResourceDescriptor { + /** ModifyOrderRequest name */ + name?: (string|null); - /** ResourceDescriptor type */ - type?: (string|null); + /** ModifyOrderRequest modifications */ + modifications?: (google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification[]|null); - /** ResourceDescriptor pattern */ - pattern?: (string[]|null); + /** ModifyOrderRequest displayName */ + displayName?: (string|null); - /** ResourceDescriptor nameField */ - nameField?: (string|null); + /** ModifyOrderRequest etag */ + etag?: (string|null); + } - /** ResourceDescriptor history */ - history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + /** Represents a ModifyOrderRequest. */ + class ModifyOrderRequest implements IModifyOrderRequest { - /** ResourceDescriptor plural */ - plural?: (string|null); + /** + * Constructs a new ModifyOrderRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest); - /** ResourceDescriptor singular */ - singular?: (string|null); + /** ModifyOrderRequest name. */ + public name: string; - /** ResourceDescriptor style */ - style?: (google.api.ResourceDescriptor.Style[]|null); - } + /** ModifyOrderRequest modifications. */ + public modifications: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification[]; - /** Represents a ResourceDescriptor. */ - class ResourceDescriptor implements IResourceDescriptor { + /** ModifyOrderRequest displayName. */ + public displayName: string; - /** - * Constructs a new ResourceDescriptor. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceDescriptor); + /** ModifyOrderRequest etag. */ + public etag: string; - /** ResourceDescriptor type. */ - public type: string; + /** + * Creates a new ModifyOrderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ModifyOrderRequest instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest; - /** ResourceDescriptor pattern. */ - public pattern: string[]; + /** + * Encodes the specified ModifyOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.verify|verify} messages. + * @param message ModifyOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor nameField. */ - public nameField: string; + /** + * Encodes the specified ModifyOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.verify|verify} messages. + * @param message ModifyOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceDescriptor history. */ - public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + /** + * Decodes a ModifyOrderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModifyOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest; - /** ResourceDescriptor plural. */ - public plural: string; + /** + * Decodes a ModifyOrderRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModifyOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest; - /** ResourceDescriptor singular. */ - public singular: string; + /** + * Verifies a ModifyOrderRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); - /** ResourceDescriptor style. */ - public style: google.api.ResourceDescriptor.Style[]; + /** + * Creates a ModifyOrderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModifyOrderRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest; - /** - * Creates a new ResourceDescriptor instance using the specified properties. - * @param [properties] Properties to set - * @returns ResourceDescriptor instance - */ - public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + /** + * Creates a plain object from a ModifyOrderRequest message. Also converts values to other types if specified. + * @param message ModifyOrderRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; - /** - * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Converts this ModifyOrderRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; - /** - * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. - * @param message ResourceDescriptor message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + /** + * Gets the default type url for ModifyOrderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @param reader Reader or buffer to decode from - * @param [length] Message length if known beforehand - * @returns ResourceDescriptor - * @throws {Error} If the payload is not 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; + namespace ModifyOrderRequest { - /** - * 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; + /** Properties of a Modification. */ + interface IModification { - /** - * 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); + /** Modification lineItemId */ + lineItemId?: (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; + /** Modification changeType */ + changeType?: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|null); - /** - * 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 }; + /** Modification newLineItemInfo */ + newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); - /** - * Converts this ResourceDescriptor to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** Modification autoRenewalBehavior */ + autoRenewalBehavior?: (google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior|keyof typeof google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior|null); + } - /** - * 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; - } + /** Represents a Modification. */ + class Modification implements IModification { - namespace ResourceDescriptor { + /** + * Constructs a new Modification. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification); - /** History enum. */ - enum History { - HISTORY_UNSPECIFIED = 0, - ORIGINALLY_SINGLE_PATTERN = 1, - FUTURE_MULTI_PATTERN = 2 - } + /** Modification lineItemId. */ + public lineItemId: string; - /** Style enum. */ - enum Style { - STYLE_UNSPECIFIED = 0, - DECLARATIVE_FRIENDLY = 1 - } - } + /** Modification changeType. */ + public changeType: (google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1.LineItemChangeType); - /** Properties of a ResourceReference. */ - interface IResourceReference { + /** Modification newLineItemInfo. */ + public newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null); - /** ResourceReference type */ - type?: (string|null); + /** Modification autoRenewalBehavior. */ + public autoRenewalBehavior: (google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior|keyof typeof google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior); - /** ResourceReference childType */ - childType?: (string|null); - } + /** + * Creates a new Modification instance using the specified properties. + * @param [properties] Properties to set + * @returns Modification instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification; - /** Represents a ResourceReference. */ - class ResourceReference implements IResourceReference { + /** + * Encodes the specified Modification message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.verify|verify} messages. + * @param message Modification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Constructs a new ResourceReference. - * @param [properties] Properties to set - */ - constructor(properties?: google.api.IResourceReference); + /** + * Encodes the specified Modification message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.verify|verify} messages. + * @param message Modification message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification, writer?: $protobuf.Writer): $protobuf.Writer; - /** ResourceReference type. */ - public type: string; + /** + * Decodes a Modification message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Modification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification; - /** ResourceReference childType. */ - public childType: string; + /** + * Decodes a Modification message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Modification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification; - /** - * 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; + /** + * Verifies a Modification message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Modification message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Modification + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification; + + /** + * Creates a plain object from a Modification message. Also converts values to other types if specified. + * @param message Modification + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Modification to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Modification + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a ModifyOrderMetadata. */ + interface IModifyOrderMetadata { + } + + /** Represents a ModifyOrderMetadata. */ + class ModifyOrderMetadata implements IModifyOrderMetadata { + + /** + * Constructs a new ModifyOrderMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata); + + /** + * Creates a new ModifyOrderMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns ModifyOrderMetadata instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata): google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata; + + /** + * Encodes the specified ModifyOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata.verify|verify} messages. + * @param message ModifyOrderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ModifyOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata.verify|verify} messages. + * @param message ModifyOrderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ModifyOrderMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ModifyOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata; + + /** + * Decodes a ModifyOrderMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ModifyOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata; + + /** + * Verifies a ModifyOrderMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ModifyOrderMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ModifyOrderMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata; + + /** + * Creates a plain object from a ModifyOrderMetadata message. Also converts values to other types if specified. + * @param message ModifyOrderMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ModifyOrderMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ModifyOrderMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CancelOrderRequest. */ + interface ICancelOrderRequest { + + /** CancelOrderRequest name */ + name?: (string|null); + + /** CancelOrderRequest etag */ + etag?: (string|null); + + /** CancelOrderRequest cancellationPolicy */ + cancellationPolicy?: (google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy|keyof typeof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy|null); + } + + /** Represents a CancelOrderRequest. */ + class CancelOrderRequest implements ICancelOrderRequest { + + /** + * Constructs a new CancelOrderRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest); + + /** CancelOrderRequest name. */ + public name: string; + + /** CancelOrderRequest etag. */ + public etag: string; + + /** CancelOrderRequest cancellationPolicy. */ + public cancellationPolicy: (google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy|keyof typeof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy); + + /** + * Creates a new CancelOrderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOrderRequest instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest): google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest; + + /** + * Encodes the specified CancelOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.verify|verify} messages. + * @param message CancelOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.verify|verify} messages. + * @param message CancelOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOrderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest; + + /** + * Decodes a CancelOrderRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest; + + /** + * Verifies a CancelOrderRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOrderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOrderRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest; + + /** + * Creates a plain object from a CancelOrderRequest message. Also converts values to other types if specified. + * @param message CancelOrderRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOrderRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOrderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CancelOrderRequest { + + /** CancellationPolicy enum. */ + enum CancellationPolicy { + CANCELLATION_POLICY_UNSPECIFIED = 0, + CANCELLATION_POLICY_CANCEL_IMMEDIATELY = 1, + CANCELLATION_POLICY_CANCEL_AT_TERM_END = 2 + } + } + + /** Properties of a CancelOrderMetadata. */ + interface ICancelOrderMetadata { + } + + /** Represents a CancelOrderMetadata. */ + class CancelOrderMetadata implements ICancelOrderMetadata { + + /** + * Constructs a new CancelOrderMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata); + + /** + * Creates a new CancelOrderMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns CancelOrderMetadata instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata): google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata; + + /** + * Encodes the specified CancelOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata.verify|verify} messages. + * @param message CancelOrderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CancelOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata.verify|verify} messages. + * @param message CancelOrderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CancelOrderMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CancelOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata; + + /** + * Decodes a CancelOrderMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CancelOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata; + + /** + * Verifies a CancelOrderMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CancelOrderMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CancelOrderMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata; + + /** + * Creates a plain object from a CancelOrderMetadata message. Also converts values to other types if specified. + * @param message CancelOrderMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CancelOrderMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CancelOrderMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace v1alpha1. */ + namespace v1alpha1 { + + /** LineItemChangeType enum. */ + enum LineItemChangeType { + LINE_ITEM_CHANGE_TYPE_UNSPECIFIED = 0, + LINE_ITEM_CHANGE_TYPE_CREATE = 1, + LINE_ITEM_CHANGE_TYPE_UPDATE = 2, + LINE_ITEM_CHANGE_TYPE_CANCEL = 3, + LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION = 4 + } + + /** LineItemChangeState enum. */ + enum LineItemChangeState { + LINE_ITEM_CHANGE_STATE_UNSPECIFIED = 0, + LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL = 1, + LINE_ITEM_CHANGE_STATE_APPROVED = 2, + LINE_ITEM_CHANGE_STATE_COMPLETED = 3, + LINE_ITEM_CHANGE_STATE_REJECTED = 4, + LINE_ITEM_CHANGE_STATE_ABANDONED = 5, + LINE_ITEM_CHANGE_STATE_ACTIVATING = 6 + } + + /** LineItemChangeStateReasonType enum. */ + enum LineItemChangeStateReasonType { + LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED = 0, + LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED = 1, + LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED = 2, + LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED = 3 + } + + /** Properties of an Order. */ + interface IOrder { + + /** Order name */ + name?: (string|null); + + /** Order displayName */ + displayName?: (string|null); + + /** Order lineItems */ + lineItems?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]|null); + + /** Order cancelledLineItems */ + cancelledLineItems?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]|null); + + /** Order createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** Order updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + + /** Order etag */ + etag?: (string|null); + } + + /** Represents an Order. */ + class Order implements IOrder { + + /** + * Constructs a new Order. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder); + + /** Order name. */ + public name: string; + + /** Order displayName. */ + public displayName: string; + + /** Order lineItems. */ + public lineItems: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]; + + /** Order cancelledLineItems. */ + public cancelledLineItems: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem[]; + + /** Order createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** Order updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** Order etag. */ + public etag: string; + + /** + * Creates a new Order instance using the specified properties. + * @param [properties] Properties to set + * @returns Order instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + + /** + * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * @param message Order message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * @param message Order message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Order message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Order + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + + /** + * Decodes an Order message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Order + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + + /** + * Verifies an Order message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Order message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Order + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Order; + + /** + * Creates a plain object from an Order message. Also converts values to other types if specified. + * @param message Order + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Order, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Order to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Order + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LineItem. */ + interface ILineItem { + + /** LineItem lineItemId */ + lineItemId?: (string|null); + + /** LineItem lineItemInfo */ + lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + + /** LineItem pendingChange */ + pendingChange?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null); + + /** LineItem changeHistory */ + changeHistory?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange[]|null); + } + + /** Represents a LineItem. */ + class LineItem implements ILineItem { + + /** + * Constructs a new LineItem. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem); + + /** LineItem lineItemId. */ + public lineItemId: string; + + /** LineItem lineItemInfo. */ + public lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + + /** LineItem pendingChange. */ + public pendingChange?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null); + + /** LineItem changeHistory. */ + public changeHistory: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange[]; + + /** + * Creates a new LineItem instance using the specified properties. + * @param [properties] Properties to set + * @returns LineItem instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + + /** + * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * @param message LineItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * @param message LineItem message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LineItem message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LineItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + + /** + * Decodes a LineItem message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LineItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + + /** + * Verifies a LineItem message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LineItem message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LineItem + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.LineItem; + + /** + * Creates a plain object from a LineItem message. Also converts values to other types if specified. + * @param message LineItem + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.LineItem, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LineItem to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LineItem + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LineItemChange. */ + interface ILineItemChange { + + /** LineItemChange changeId */ + changeId?: (string|null); + + /** LineItemChange changeType */ + changeType?: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|null); + + /** LineItemChange oldLineItemInfo */ + oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + + /** LineItemChange newLineItemInfo */ + newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + + /** LineItemChange changeState */ + changeState?: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|null); + + /** LineItemChange stateReason */ + stateReason?: (string|null); + + /** LineItemChange changeStateReasonType */ + changeStateReasonType?: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|null); + + /** LineItemChange changeEffectiveTime */ + changeEffectiveTime?: (google.protobuf.ITimestamp|null); + + /** LineItemChange createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** LineItemChange updateTime */ + updateTime?: (google.protobuf.ITimestamp|null); + } + + /** Represents a LineItemChange. */ + class LineItemChange implements ILineItemChange { + + /** + * Constructs a new LineItemChange. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange); + + /** LineItemChange changeId. */ + public changeId: string; + + /** LineItemChange changeType. */ + public changeType: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType); + + /** LineItemChange oldLineItemInfo. */ + public oldLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + + /** LineItemChange newLineItemInfo. */ + public newLineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null); + + /** LineItemChange changeState. */ + public changeState: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState); + + /** LineItemChange stateReason. */ + public stateReason: string; + + /** LineItemChange changeStateReasonType. */ + public changeStateReasonType: (google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|keyof typeof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType); + + /** LineItemChange changeEffectiveTime. */ + public changeEffectiveTime?: (google.protobuf.ITimestamp|null); + + /** LineItemChange createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** LineItemChange updateTime. */ + public updateTime?: (google.protobuf.ITimestamp|null); + + /** + * Creates a new LineItemChange instance using the specified properties. + * @param [properties] Properties to set + * @returns LineItemChange instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + + /** + * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * @param message LineItemChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * @param message LineItemChange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LineItemChange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LineItemChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + + /** + * Decodes a LineItemChange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LineItemChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + + /** + * Verifies a LineItemChange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LineItemChange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LineItemChange + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange; + + /** + * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. + * @param message LineItemChange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LineItemChange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LineItemChange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a LineItemInfo. */ + interface ILineItemInfo { + + /** LineItemInfo offer */ + offer?: (string|null); + + /** LineItemInfo parameters */ + parameters?: (google.cloud.commerce.consumer.procurement.v1alpha1.IParameter[]|null); + + /** LineItemInfo subscription */ + subscription?: (google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null); + } + + /** Represents a LineItemInfo. */ + class LineItemInfo implements ILineItemInfo { + + /** + * Constructs a new LineItemInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo); + + /** LineItemInfo offer. */ + public offer: string; + + /** LineItemInfo parameters. */ + public parameters: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter[]; + + /** LineItemInfo subscription. */ + public subscription?: (google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null); + + /** + * Creates a new LineItemInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns LineItemInfo instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + + /** + * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. + * @param message LineItemInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. + * @param message LineItemInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LineItemInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LineItemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + + /** + * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LineItemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + + /** + * Verifies a LineItemInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LineItemInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LineItemInfo + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo; + + /** + * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. + * @param message LineItemInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LineItemInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LineItemInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Parameter. */ + interface IParameter { + + /** Parameter name */ + name?: (string|null); + + /** Parameter value */ + value?: (google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null); + } + + /** Represents a Parameter. */ + class Parameter implements IParameter { + + /** + * Constructs a new Parameter. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter); + + /** Parameter name. */ + public name: string; + + /** Parameter value. */ + public value?: (google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null); + + /** + * Creates a new Parameter instance using the specified properties. + * @param [properties] Properties to set + * @returns Parameter instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * @param message Parameter message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IParameter, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + + /** + * Verifies a Parameter message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Parameter + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @param message Parameter + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Parameter to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Parameter + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Parameter { + + /** Properties of a Value. */ + interface IValue { + + /** Value int64Value */ + int64Value?: (number|Long|string|null); + + /** Value stringValue */ + stringValue?: (string|null); + + /** Value doubleValue */ + doubleValue?: (number|null); + } + + /** Represents a Value. */ + class Value implements IValue { + + /** + * Constructs a new Value. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue); + + /** Value int64Value. */ + public int64Value?: (number|Long|string|null); + + /** Value stringValue. */ + public stringValue?: (string|null); + + /** Value doubleValue. */ + public doubleValue?: (number|null); + + /** Value kind. */ + public kind?: ("int64Value"|"stringValue"|"doubleValue"); + + /** + * Creates a new Value instance using the specified properties. + * @param [properties] Properties to set + * @returns Value instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. + * @param message Value message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Value message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + + /** + * Verifies a Value message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Value + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @param message Value + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Value to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Value + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a Subscription. */ + interface ISubscription { + + /** Subscription startTime */ + startTime?: (google.protobuf.ITimestamp|null); + + /** Subscription endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** Subscription autoRenewalEnabled */ + autoRenewalEnabled?: (boolean|null); + } + + /** Represents a Subscription. */ + class Subscription implements ISubscription { + + /** + * Constructs a new Subscription. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription); + + /** Subscription startTime. */ + public startTime?: (google.protobuf.ITimestamp|null); + + /** Subscription endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** Subscription autoRenewalEnabled. */ + public autoRenewalEnabled: boolean; + + /** + * Creates a new Subscription instance using the specified properties. + * @param [properties] Properties to set + * @returns Subscription instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + + /** + * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * @param message Subscription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * @param message Subscription message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Subscription message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Subscription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + + /** + * Decodes a Subscription message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Subscription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + + /** + * Verifies a Subscription message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Subscription message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Subscription + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.Subscription; + + /** + * Creates a plain object from a Subscription message. Also converts values to other types if specified. + * @param message Subscription + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.Subscription, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Subscription to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Subscription + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Represents a ConsumerProcurementService */ + class ConsumerProcurementService extends $protobuf.rpc.Service { + + /** + * Constructs a new ConsumerProcurementService 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 ConsumerProcurementService 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): ConsumerProcurementService; + + /** + * Calls PlaceOrder. + * @param request PlaceOrderRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public placeOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.PlaceOrderCallback): void; + + /** + * Calls PlaceOrder. + * @param request PlaceOrderRequest message or plain object + * @returns Promise + */ + public placeOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest): Promise; + + /** + * Calls GetOrder. + * @param request GetOrderRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Order + */ + public getOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest, callback: google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.GetOrderCallback): void; + + /** + * Calls GetOrder. + * @param request GetOrderRequest message or plain object + * @returns Promise + */ + public getOrder(request: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest): Promise; + + /** + * Calls ListOrders. + * @param request ListOrdersRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListOrdersResponse + */ + public listOrders(request: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, callback: google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.ListOrdersCallback): void; + + /** + * Calls ListOrders. + * @param request ListOrdersRequest message or plain object + * @returns Promise + */ + public listOrders(request: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest): Promise; + } + + namespace ConsumerProcurementService { + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|placeOrder}. + * @param error Error, if any + * @param [response] Operation + */ + type PlaceOrderCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|getOrder}. + * @param error Error, if any + * @param [response] Order + */ + type GetOrderCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1alpha1.Order) => void; + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|listOrders}. + * @param error Error, if any + * @param [response] ListOrdersResponse + */ + type ListOrdersCallback = (error: (Error|null), response?: google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse) => void; + } + + /** Properties of a PlaceOrderRequest. */ + interface IPlaceOrderRequest { + + /** PlaceOrderRequest parent */ + parent?: (string|null); + + /** PlaceOrderRequest displayName */ + displayName?: (string|null); + + /** PlaceOrderRequest lineItemInfo */ + lineItemInfo?: (google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo[]|null); + + /** PlaceOrderRequest requestId */ + requestId?: (string|null); + } + + /** Represents a PlaceOrderRequest. */ + class PlaceOrderRequest implements IPlaceOrderRequest { + + /** + * Constructs a new PlaceOrderRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest); + + /** PlaceOrderRequest parent. */ + public parent: string; + + /** PlaceOrderRequest displayName. */ + public displayName: string; + + /** PlaceOrderRequest lineItemInfo. */ + public lineItemInfo: google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo[]; + + /** PlaceOrderRequest requestId. */ + public requestId: string; + + /** + * Creates a new PlaceOrderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceOrderRequest instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + + /** + * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * @param message PlaceOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * @param message PlaceOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceOrderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + + /** + * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + + /** + * Verifies a PlaceOrderRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceOrderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceOrderRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest; + + /** + * Creates a plain object from a PlaceOrderRequest message. Also converts values to other types if specified. + * @param message PlaceOrderRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceOrderRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceOrderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PlaceOrderMetadata. */ + interface IPlaceOrderMetadata { + } + + /** Represents a PlaceOrderMetadata. */ + class PlaceOrderMetadata implements IPlaceOrderMetadata { + + /** + * Constructs a new PlaceOrderMetadata. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata); + + /** + * Creates a new PlaceOrderMetadata instance using the specified properties. + * @param [properties] Properties to set + * @returns PlaceOrderMetadata instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + + /** + * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * @param message PlaceOrderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * @param message PlaceOrderMetadata message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PlaceOrderMetadata message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PlaceOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + + /** + * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PlaceOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + + /** + * Verifies a PlaceOrderMetadata message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PlaceOrderMetadata message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PlaceOrderMetadata + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata; + + /** + * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. + * @param message PlaceOrderMetadata + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PlaceOrderMetadata to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PlaceOrderMetadata + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetOrderRequest. */ + interface IGetOrderRequest { + + /** GetOrderRequest name */ + name?: (string|null); + } + + /** Represents a GetOrderRequest. */ + class GetOrderRequest implements IGetOrderRequest { + + /** + * Constructs a new GetOrderRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest); + + /** GetOrderRequest name. */ + public name: string; + + /** + * Creates a new GetOrderRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOrderRequest instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + + /** + * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. + * @param message GetOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. + * @param message GetOrderRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + + /** + * Verifies a GetOrderRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOrderRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest; + + /** + * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. + * @param message GetOrderRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOrderRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOrderRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOrdersRequest. */ + interface IListOrdersRequest { + + /** ListOrdersRequest parent */ + parent?: (string|null); + + /** ListOrdersRequest pageSize */ + pageSize?: (number|null); + + /** ListOrdersRequest pageToken */ + pageToken?: (string|null); + + /** ListOrdersRequest filter */ + filter?: (string|null); + } + + /** Represents a ListOrdersRequest. */ + class ListOrdersRequest implements IListOrdersRequest { + + /** + * Constructs a new ListOrdersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest); + + /** ListOrdersRequest parent. */ + public parent: string; + + /** ListOrdersRequest pageSize. */ + public pageSize: number; + + /** ListOrdersRequest pageToken. */ + public pageToken: string; + + /** ListOrdersRequest filter. */ + public filter: string; + + /** + * Creates a new ListOrdersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOrdersRequest instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + + /** + * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * @param message ListOrdersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * @param message ListOrdersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOrdersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOrdersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + + /** + * Verifies a ListOrdersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOrdersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest; + + /** + * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. + * @param message ListOrdersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOrdersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOrdersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListOrdersResponse. */ + interface IListOrdersResponse { + + /** ListOrdersResponse orders */ + orders?: (google.cloud.commerce.consumer.procurement.v1alpha1.IOrder[]|null); - /** - * 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; + /** ListOrdersResponse nextPageToken */ + nextPageToken?: (string|null); + } - /** - * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. - * @param message ResourceReference message or plain object to encode - * @param [writer] Writer to encode to - * @returns Writer - */ - public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + /** Represents a ListOrdersResponse. */ + class ListOrdersResponse implements IListOrdersResponse { - /** - * 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; + /** + * Constructs a new ListOrdersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse); - /** - * 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; + /** ListOrdersResponse orders. */ + public orders: google.cloud.commerce.consumer.procurement.v1alpha1.IOrder[]; - /** - * 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); + /** ListOrdersResponse nextPageToken. */ + public nextPageToken: string; - /** - * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. - * @param object Plain object - * @returns ResourceReference - */ - public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + /** + * Creates a new ListOrdersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListOrdersResponse instance + */ + public static create(properties?: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; - /** - * 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 }; + /** + * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * @param message ListOrdersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Converts this ResourceReference to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * @param message ListOrdersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * 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; + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListOrdersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListOrdersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + + /** + * Verifies a ListOrdersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListOrdersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse; + + /** + * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. + * @param message ListOrdersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListOrdersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListOrdersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } } + } + + /** Namespace api. */ + namespace api { /** Properties of a Http. */ interface IHttp { @@ -4746,356 +6514,621 @@ export namespace google { /** Properties of a GoSettings. */ interface IGoSettings { - /** GoSettings common */ - common?: (google.api.ICommonLanguageSettings|null); + /** 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 GoSettings. */ - class GoSettings implements IGoSettings { + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { /** - * Constructs a new GoSettings. + * Constructs a new MethodSettings. * @param [properties] Properties to set */ - constructor(properties?: google.api.IGoSettings); + constructor(properties?: google.api.IMethodSettings); - /** GoSettings common. */ - public common?: (google.api.ICommonLanguageSettings|null); + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; /** - * Creates a new GoSettings instance using the specified properties. + * Creates a new MethodSettings instance using the specified properties. * @param [properties] Properties to set - * @returns GoSettings instance + * @returns MethodSettings instance */ - public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; /** - * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * Encodes the specified 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.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. - * @param message GoSettings message or plain object to encode + * Encodes the specified 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.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GoSettings message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GoSettings + * @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.GoSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; /** - * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GoSettings + * @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.GoSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; /** - * Verifies a GoSettings message. + * Verifies a MethodSettings message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GoSettings + * @returns MethodSettings */ - public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; /** - * Creates a plain object from a GoSettings message. Also converts values to other types if specified. - * @param message GoSettings + * Creates a plain object from a 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.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GoSettings to JSON. + * Converts this MethodSettings to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GoSettings + * Gets the default type url for MethodSettings * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a MethodSettings. */ - interface IMethodSettings { + namespace MethodSettings { - /** MethodSettings selector */ - selector?: (string|null); + /** Properties of a LongRunning. */ + interface ILongRunning { - /** MethodSettings longRunning */ - longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** 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); - /** MethodSettings autoPopulatedFields */ - autoPopulatedFields?: (string[]|null); + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); } - /** Represents a MethodSettings. */ - class MethodSettings implements IMethodSettings { + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { /** - * Constructs a new MethodSettings. + * Constructs a new ResourceDescriptor. * @param [properties] Properties to set */ - constructor(properties?: google.api.IMethodSettings); + constructor(properties?: google.api.IResourceDescriptor); - /** MethodSettings selector. */ - public selector: string; + /** ResourceDescriptor type. */ + public type: string; - /** MethodSettings longRunning. */ - public longRunning?: (google.api.MethodSettings.ILongRunning|null); + /** ResourceDescriptor pattern. */ + public pattern: string[]; - /** MethodSettings autoPopulatedFields. */ - public autoPopulatedFields: 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 MethodSettings instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @param [properties] Properties to set - * @returns MethodSettings instance + * @returns ResourceDescriptor instance */ - public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * Encodes the specified 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.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. - * @param message MethodSettings message or plain object to encode + * Encodes the specified 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.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns MethodSettings + * @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.MethodSettings; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns MethodSettings + * @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.MethodSettings; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; /** - * Verifies a MethodSettings message. + * Verifies a ResourceDescriptor message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns MethodSettings + * @returns ResourceDescriptor */ - public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; /** - * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. - * @param message MethodSettings + * Creates a plain object from a 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.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this MethodSettings to JSON. + * Converts this ResourceDescriptor to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for MethodSettings + * 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 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); + namespace ResourceDescriptor { - /** LongRunning totalPollTimeout */ - totalPollTimeout?: (google.protobuf.IDuration|null); + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 } - /** 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); + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } - /** LongRunning pollDelayMultiplier. */ - public pollDelayMultiplier: number; + /** Properties of a ResourceReference. */ + interface IResourceReference { - /** LongRunning maxPollDelay. */ - public maxPollDelay?: (google.protobuf.IDuration|null); + /** ResourceReference type */ + type?: (string|null); - /** LongRunning totalPollTimeout. */ - public totalPollTimeout?: (google.protobuf.IDuration|null); + /** ResourceReference childType */ + childType?: (string|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; + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { - /** - * 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; + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); - /** - * 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; + /** ResourceReference type. */ + public type: string; - /** - * 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; + /** ResourceReference childType. */ + public childType: string; - /** - * 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; + /** + * 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; - /** - * 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); + /** + * 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; - /** - * 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; + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; - /** - * Creates a 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 }; + /** + * 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; - /** - * Converts this LongRunning to JSON. - * @returns JSON object - */ - public toJSON(): { [k: string]: any }; + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; - /** - * 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; - } - } + /** + * 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); - /** 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 - } + /** + * 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; - /** ClientLibraryDestination enum. */ - enum ClientLibraryDestination { - CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, - GITHUB = 10, - PACKAGE_MANAGER = 20 - } + /** + * 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 }; - /** LaunchStage enum. */ - enum LaunchStage { - LAUNCH_STAGE_UNSPECIFIED = 0, - UNIMPLEMENTED = 6, - PRELAUNCH = 7, - EARLY_ACCESS = 1, - ALPHA = 2, - BETA = 3, - GA = 4, - DEPRECATED = 5 + /** + * 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; } } @@ -9207,206 +11240,303 @@ export namespace google { } } - /** Properties of a Timestamp. */ - interface ITimestamp { + /** Properties of a Duration. */ + interface IDuration { - /** Timestamp seconds */ + /** Duration seconds */ seconds?: (number|Long|string|null); - /** Timestamp nanos */ + /** Duration nanos */ nanos?: (number|null); } - /** Represents a Timestamp. */ - class Timestamp implements ITimestamp { + /** Represents a Duration. */ + class Duration implements IDuration { /** - * Constructs a new Timestamp. + * Constructs a new Duration. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.ITimestamp); + constructor(properties?: google.protobuf.IDuration); - /** Timestamp seconds. */ + /** Duration seconds. */ public seconds: (number|Long|string); - /** Timestamp nanos. */ + /** Duration nanos. */ public nanos: number; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new Duration instance using the specified properties. * @param [properties] Properties to set - * @returns Timestamp instance + * @returns Duration instance */ - public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. - * @param message Timestamp message or plain object to encode + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.IDuration, 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 + * 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.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a Duration message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Timestamp + * @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.Timestamp; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a Duration message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Timestamp + * @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.Timestamp; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; /** - * Verifies a Timestamp message. + * Verifies a Duration message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a Duration message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Timestamp + * @returns Duration */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. - * @param message Timestamp + * 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.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Timestamp to JSON. + * Converts this Duration to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Timestamp + * 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 Duration. */ - interface IDuration { + /** Properties of a FieldMask. */ + interface IFieldMask { - /** Duration seconds */ + /** FieldMask paths */ + paths?: (string[]|null); + } + + /** Represents a FieldMask. */ + class FieldMask implements IFieldMask { + + /** + * Constructs a new FieldMask. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldMask); + + /** FieldMask paths. */ + public paths: string[]; + + /** + * Creates a new FieldMask instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldMask instance + */ + public static create(properties?: google.protobuf.IFieldMask): google.protobuf.FieldMask; + + /** + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. + * @param message FieldMask message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldMask, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldMask message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldMask; + + /** + * Decodes a FieldMask message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldMask + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldMask; + + /** + * Verifies a FieldMask message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldMask + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldMask; + + /** + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. + * @param message FieldMask + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldMask, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldMask to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldMask + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a Timestamp. */ + interface ITimestamp { + + /** Timestamp seconds */ seconds?: (number|Long|string|null); - /** Duration nanos */ + /** Timestamp nanos */ nanos?: (number|null); } - /** Represents a Duration. */ - class Duration implements IDuration { + /** Represents a Timestamp. */ + class Timestamp implements ITimestamp { /** - * Constructs a new Duration. + * Constructs a new Timestamp. * @param [properties] Properties to set */ - constructor(properties?: google.protobuf.IDuration); + constructor(properties?: google.protobuf.ITimestamp); - /** Duration seconds. */ + /** Timestamp seconds. */ public seconds: (number|Long|string); - /** Duration nanos. */ + /** Timestamp nanos. */ public nanos: number; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @param [properties] Properties to set - * @returns Duration instance + * @returns Timestamp instance */ - public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + public static create(properties?: google.protobuf.ITimestamp): google.protobuf.Timestamp; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. - * @param message Duration message or plain object to encode + * Encodes the specified 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.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.protobuf.ITimestamp, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Duration + * @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.Duration; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Timestamp; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Duration + * @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.Duration; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Timestamp; /** - * Verifies a Duration message. + * Verifies a Timestamp message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Duration + * @returns Timestamp */ - public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + public static fromObject(object: { [k: string]: any }): google.protobuf.Timestamp; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. - * @param message Duration + * Creates a plain object from a 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.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.protobuf.Timestamp, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Duration to JSON. + * Converts this Timestamp to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Duration + * Gets the default type url for Timestamp * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ diff --git a/packages/google-cloud-commerce-consumer-procurement/protos/protos.js b/packages/google-cloud-commerce-consumer-procurement/protos/protos.js index 83a72fc6b52..defbcd0c0f1 100644 --- a/packages/google-cloud-commerce-consumer-procurement/protos/protos.js +++ b/packages/google-cloud-commerce-consumer-procurement/protos/protos.js @@ -84,260 +84,329 @@ */ var v1 = {}; - /** - * LineItemChangeType enum. - * @name google.cloud.commerce.consumer.procurement.v1.LineItemChangeType - * @enum {number} - * @property {number} LINE_ITEM_CHANGE_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_TYPE_UNSPECIFIED value - * @property {number} LINE_ITEM_CHANGE_TYPE_CREATE=1 LINE_ITEM_CHANGE_TYPE_CREATE value - * @property {number} LINE_ITEM_CHANGE_TYPE_UPDATE=2 LINE_ITEM_CHANGE_TYPE_UPDATE value - * @property {number} LINE_ITEM_CHANGE_TYPE_CANCEL=3 LINE_ITEM_CHANGE_TYPE_CANCEL value - * @property {number} LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION=4 LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION value - */ - v1.LineItemChangeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM_CHANGE_TYPE_CREATE"] = 1; - values[valuesById[2] = "LINE_ITEM_CHANGE_TYPE_UPDATE"] = 2; - values[valuesById[3] = "LINE_ITEM_CHANGE_TYPE_CANCEL"] = 3; - values[valuesById[4] = "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION"] = 4; - return values; - })(); + v1.LicenseManagementService = (function() { - /** - * LineItemChangeState enum. - * @name google.cloud.commerce.consumer.procurement.v1.LineItemChangeState - * @enum {number} - * @property {number} LINE_ITEM_CHANGE_STATE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_UNSPECIFIED value - * @property {number} LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL=1 LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL value - * @property {number} LINE_ITEM_CHANGE_STATE_APPROVED=2 LINE_ITEM_CHANGE_STATE_APPROVED value - * @property {number} LINE_ITEM_CHANGE_STATE_COMPLETED=3 LINE_ITEM_CHANGE_STATE_COMPLETED value - * @property {number} LINE_ITEM_CHANGE_STATE_REJECTED=4 LINE_ITEM_CHANGE_STATE_REJECTED value - * @property {number} LINE_ITEM_CHANGE_STATE_ABANDONED=5 LINE_ITEM_CHANGE_STATE_ABANDONED value - * @property {number} LINE_ITEM_CHANGE_STATE_ACTIVATING=6 LINE_ITEM_CHANGE_STATE_ACTIVATING value - */ - v1.LineItemChangeState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL"] = 1; - values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_APPROVED"] = 2; - values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_COMPLETED"] = 3; - values[valuesById[4] = "LINE_ITEM_CHANGE_STATE_REJECTED"] = 4; - values[valuesById[5] = "LINE_ITEM_CHANGE_STATE_ABANDONED"] = 5; - values[valuesById[6] = "LINE_ITEM_CHANGE_STATE_ACTIVATING"] = 6; - return values; - })(); + /** + * Constructs a new LicenseManagementService service. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a LicenseManagementService + * @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 LicenseManagementService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * LineItemChangeStateReasonType enum. - * @name google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType - * @enum {number} - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED value - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED=1 LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED value - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED=2 LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED value - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED=3 LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED value - */ - v1.LineItemChangeStateReasonType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED"] = 1; - values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED"] = 2; - values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED"] = 3; - return values; - })(); + (LicenseManagementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = LicenseManagementService; - v1.Order = (function() { + /** + * Creates new LicenseManagementService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @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 {LicenseManagementService} RPC service. Useful where requests and/or responses are streamed. + */ + LicenseManagementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; /** - * Properties of an Order. - * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IOrder - * @property {string|null} [name] Order name - * @property {string|null} [displayName] Order displayName - * @property {Array.|null} [lineItems] Order lineItems - * @property {Array.|null} [cancelledLineItems] Order cancelledLineItems - * @property {google.protobuf.ITimestamp|null} [createTime] Order createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Order updateTime - * @property {string|null} [etag] Order etag + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|getLicensePool}. + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @typedef GetLicensePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.LicensePool} [response] LicensePool */ /** - * Constructs a new Order. - * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents an Order. - * @implements IOrder - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IOrder=} [properties] Properties to set + * Calls GetLicensePool. + * @function getLicensePool + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest} request GetLicensePoolRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePoolCallback} callback Node-style callback called with the error, if any, and LicensePool + * @returns {undefined} + * @variation 1 */ - function Order(properties) { - this.lineItems = []; - this.cancelledLineItems = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + Object.defineProperty(LicenseManagementService.prototype.getLicensePool = function getLicensePool(request, callback) { + return this.rpcCall(getLicensePool, $root.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest, $root.google.cloud.commerce.consumer.procurement.v1.LicensePool, request, callback); + }, "name", { value: "GetLicensePool" }); /** - * Order name. - * @member {string} name - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Calls GetLicensePool. + * @function getLicensePool + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest} request GetLicensePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Order.prototype.name = ""; /** - * Order displayName. - * @member {string} displayName - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|updateLicensePool}. + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @typedef UpdateLicensePoolCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.LicensePool} [response] LicensePool + */ + + /** + * Calls UpdateLicensePool. + * @function updateLicensePool + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest} request UpdateLicensePoolRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePoolCallback} callback Node-style callback called with the error, if any, and LicensePool + * @returns {undefined} + * @variation 1 */ - Order.prototype.displayName = ""; + Object.defineProperty(LicenseManagementService.prototype.updateLicensePool = function updateLicensePool(request, callback) { + return this.rpcCall(updateLicensePool, $root.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest, $root.google.cloud.commerce.consumer.procurement.v1.LicensePool, request, callback); + }, "name", { value: "UpdateLicensePool" }); /** - * Order lineItems. - * @member {Array.} lineItems - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Calls UpdateLicensePool. + * @function updateLicensePool + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest} request UpdateLicensePoolRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|assign}. + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @typedef AssignCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.AssignResponse} [response] AssignResponse + */ + + /** + * Calls Assign. + * @function assign + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignRequest} request AssignRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.AssignCallback} callback Node-style callback called with the error, if any, and AssignResponse + * @returns {undefined} + * @variation 1 */ - Order.prototype.lineItems = $util.emptyArray; + Object.defineProperty(LicenseManagementService.prototype.assign = function assign(request, callback) { + return this.rpcCall(assign, $root.google.cloud.commerce.consumer.procurement.v1.AssignRequest, $root.google.cloud.commerce.consumer.procurement.v1.AssignResponse, request, callback); + }, "name", { value: "Assign" }); /** - * Order cancelledLineItems. - * @member {Array.} cancelledLineItems - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Calls Assign. + * @function assign + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignRequest} request AssignRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Order.prototype.cancelledLineItems = $util.emptyArray; /** - * Order createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|unassign}. + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @typedef UnassignCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.UnassignResponse} [response] UnassignResponse + */ + + /** + * Calls Unassign. + * @function unassign + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignRequest} request UnassignRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UnassignCallback} callback Node-style callback called with the error, if any, and UnassignResponse + * @returns {undefined} + * @variation 1 */ - Order.prototype.createTime = null; + Object.defineProperty(LicenseManagementService.prototype.unassign = function unassign(request, callback) { + return this.rpcCall(unassign, $root.google.cloud.commerce.consumer.procurement.v1.UnassignRequest, $root.google.cloud.commerce.consumer.procurement.v1.UnassignResponse, request, callback); + }, "name", { value: "Unassign" }); /** - * Order updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Calls Unassign. + * @function unassign + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignRequest} request UnassignRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.LicenseManagementService|enumerateLicensedUsers}. + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService + * @typedef EnumerateLicensedUsersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse} [response] EnumerateLicensedUsersResponse + */ + + /** + * Calls EnumerateLicensedUsers. + * @function enumerateLicensedUsers + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest} request EnumerateLicensedUsersRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsersCallback} callback Node-style callback called with the error, if any, and EnumerateLicensedUsersResponse + * @returns {undefined} + * @variation 1 */ - Order.prototype.updateTime = null; + Object.defineProperty(LicenseManagementService.prototype.enumerateLicensedUsers = function enumerateLicensedUsers(request, callback) { + return this.rpcCall(enumerateLicensedUsers, $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest, $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse, request, callback); + }, "name", { value: "EnumerateLicensedUsers" }); /** - * Order etag. - * @member {string} etag - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * Calls EnumerateLicensedUsers. + * @function enumerateLicensedUsers + * @memberof google.cloud.commerce.consumer.procurement.v1.LicenseManagementService * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest} request EnumerateLicensedUsersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 */ - Order.prototype.etag = ""; + + return LicenseManagementService; + })(); + + v1.AssignmentProtocol = (function() { /** - * Creates a new Order instance using the specified properties. + * Properties of an AssignmentProtocol. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IAssignmentProtocol + * @property {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType|null} [manualAssignmentType] AssignmentProtocol manualAssignmentType + * @property {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType|null} [autoAssignmentType] AssignmentProtocol autoAssignmentType + */ + + /** + * Constructs a new AssignmentProtocol. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents an AssignmentProtocol. + * @implements IAssignmentProtocol + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol=} [properties] Properties to set + */ + function AssignmentProtocol(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AssignmentProtocol manualAssignmentType. + * @member {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType|null|undefined} manualAssignmentType + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @instance + */ + AssignmentProtocol.prototype.manualAssignmentType = null; + + /** + * AssignmentProtocol autoAssignmentType. + * @member {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType|null|undefined} autoAssignmentType + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @instance + */ + AssignmentProtocol.prototype.autoAssignmentType = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * AssignmentProtocol assignmentType. + * @member {"manualAssignmentType"|"autoAssignmentType"|undefined} assignmentType + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @instance + */ + Object.defineProperty(AssignmentProtocol.prototype, "assignmentType", { + get: $util.oneOfGetter($oneOfFields = ["manualAssignmentType", "autoAssignmentType"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new AssignmentProtocol instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IOrder=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order instance + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol} AssignmentProtocol instance */ - Order.create = function create(properties) { - return new Order(properties); + AssignmentProtocol.create = function create(properties) { + return new AssignmentProtocol(properties); }; /** - * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. + * Encodes the specified AssignmentProtocol message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IOrder} message Order message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol} message AssignmentProtocol message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Order.encode = function encode(message, writer) { + AssignmentProtocol.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.lineItems != null && message.lineItems.length) - for (var i = 0; i < message.lineItems.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1.LineItem.encode(message.lineItems[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cancelledLineItems != null && message.cancelledLineItems.length) - for (var i = 0; i < message.cancelledLineItems.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1.LineItem.encode(message.cancelledLineItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.displayName); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.manualAssignmentType != null && Object.hasOwnProperty.call(message, "manualAssignmentType")) + $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.encode(message.manualAssignmentType, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.autoAssignmentType != null && Object.hasOwnProperty.call(message, "autoAssignmentType")) + $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.encode(message.autoAssignmentType, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. + * Encodes the specified AssignmentProtocol message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IOrder} message Order message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol} message AssignmentProtocol message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Order.encodeDelimited = function encodeDelimited(message, writer) { + AssignmentProtocol.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Order message from the specified reader or buffer. + * Decodes an AssignmentProtocol message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol} AssignmentProtocol * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.decode = function decode(reader, length) { + AssignmentProtocol.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Order(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - case 10: { - message.displayName = reader.string(); + case 2: { + message.manualAssignmentType = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.decode(reader, reader.uint32()); break; } - case 6: { - if (!(message.lineItems && message.lineItems.length)) - message.lineItems = []; - message.lineItems.push($root.google.cloud.commerce.consumer.procurement.v1.LineItem.decode(reader, reader.uint32())); - break; - } - case 7: { - if (!(message.cancelledLineItems && message.cancelledLineItems.length)) - message.cancelledLineItems = []; - message.cancelledLineItems.push($root.google.cloud.commerce.consumer.procurement.v1.LineItem.decode(reader, reader.uint32())); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 11: { - message.etag = reader.string(); + case 3: { + message.autoAssignmentType = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.decode(reader, reader.uint32()); break; } default: @@ -349,342 +418,656 @@ }; /** - * Decodes an Order message from the specified reader or buffer, length delimited. + * Decodes an AssignmentProtocol message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol} AssignmentProtocol * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.decodeDelimited = function decodeDelimited(reader) { + AssignmentProtocol.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Order message. + * Verifies an AssignmentProtocol message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Order.verify = function verify(message) { + AssignmentProtocol.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.lineItems != null && message.hasOwnProperty("lineItems")) { - if (!Array.isArray(message.lineItems)) - return "lineItems: array expected"; - for (var i = 0; i < message.lineItems.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.verify(message.lineItems[i]); + var properties = {}; + if (message.manualAssignmentType != null && message.hasOwnProperty("manualAssignmentType")) { + properties.assignmentType = 1; + { + var error = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.verify(message.manualAssignmentType); if (error) - return "lineItems." + error; + return "manualAssignmentType." + error; } } - if (message.cancelledLineItems != null && message.hasOwnProperty("cancelledLineItems")) { - if (!Array.isArray(message.cancelledLineItems)) - return "cancelledLineItems: array expected"; - for (var i = 0; i < message.cancelledLineItems.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.verify(message.cancelledLineItems[i]); + if (message.autoAssignmentType != null && message.hasOwnProperty("autoAssignmentType")) { + if (properties.assignmentType === 1) + return "assignmentType: multiple values"; + properties.assignmentType = 1; + { + var error = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.verify(message.autoAssignmentType); if (error) - return "cancelledLineItems." + error; + return "autoAssignmentType." + error; } } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates an Order message from a plain object. Also converts values to their respective internal types. + * Creates an AssignmentProtocol message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol} AssignmentProtocol */ - Order.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Order) + AssignmentProtocol.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.Order(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.lineItems) { - if (!Array.isArray(object.lineItems)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.lineItems: array expected"); - message.lineItems = []; - for (var i = 0; i < object.lineItems.length; ++i) { - if (typeof object.lineItems[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.lineItems: object expected"); - message.lineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.fromObject(object.lineItems[i]); - } - } - if (object.cancelledLineItems) { - if (!Array.isArray(object.cancelledLineItems)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.cancelledLineItems: array expected"); - message.cancelledLineItems = []; - for (var i = 0; i < object.cancelledLineItems.length; ++i) { - if (typeof object.cancelledLineItems[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.cancelledLineItems: object expected"); - message.cancelledLineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.fromObject(object.cancelledLineItems[i]); - } - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol(); + if (object.manualAssignmentType != null) { + if (typeof object.manualAssignmentType !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.manualAssignmentType: object expected"); + message.manualAssignmentType = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.fromObject(object.manualAssignmentType); } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + if (object.autoAssignmentType != null) { + if (typeof object.autoAssignmentType !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.autoAssignmentType: object expected"); + message.autoAssignmentType = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.fromObject(object.autoAssignmentType); } - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from an Order message. Also converts values to other types if specified. + * Creates a plain object from an AssignmentProtocol message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Order} message Order + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol} message AssignmentProtocol * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Order.toObject = function toObject(message, options) { + AssignmentProtocol.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.lineItems = []; - object.cancelledLineItems = []; - } - if (options.defaults) { - object.name = ""; - object.createTime = null; - object.updateTime = null; - object.displayName = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lineItems && message.lineItems.length) { - object.lineItems = []; - for (var j = 0; j < message.lineItems.length; ++j) - object.lineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.toObject(message.lineItems[j], options); + if (message.manualAssignmentType != null && message.hasOwnProperty("manualAssignmentType")) { + object.manualAssignmentType = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.toObject(message.manualAssignmentType, options); + if (options.oneofs) + object.assignmentType = "manualAssignmentType"; } - if (message.cancelledLineItems && message.cancelledLineItems.length) { - object.cancelledLineItems = []; - for (var j = 0; j < message.cancelledLineItems.length; ++j) - object.cancelledLineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.toObject(message.cancelledLineItems[j], options); + if (message.autoAssignmentType != null && message.hasOwnProperty("autoAssignmentType")) { + object.autoAssignmentType = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.toObject(message.autoAssignmentType, options); + if (options.oneofs) + object.assignmentType = "autoAssignmentType"; } - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; return object; }; /** - * Converts this Order to JSON. + * Converts this AssignmentProtocol to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @instance * @returns {Object.} JSON object */ - Order.prototype.toJSON = function toJSON() { + AssignmentProtocol.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Order + * Gets the default type url for AssignmentProtocol * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AssignmentProtocol.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Order"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol"; }; - return Order; - })(); + AssignmentProtocol.ManualAssignmentType = (function() { - v1.LineItem = (function() { + /** + * Properties of a ManualAssignmentType. + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @interface IManualAssignmentType + */ - /** - * Properties of a LineItem. - * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface ILineItem - * @property {string|null} [lineItemId] LineItem lineItemId - * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [lineItemInfo] LineItem lineItemInfo - * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null} [pendingChange] LineItem pendingChange - * @property {Array.|null} [changeHistory] LineItem changeHistory - */ + /** + * Constructs a new ManualAssignmentType. + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @classdesc Represents a ManualAssignmentType. + * @implements IManualAssignmentType + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType=} [properties] Properties to set + */ + function ManualAssignmentType(properties) { + if (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 LineItem. - * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a LineItem. - * @implements ILineItem - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem=} [properties] Properties to set - */ - function LineItem(properties) { - this.changeHistory = []; - if (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 ManualAssignmentType instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType} ManualAssignmentType instance + */ + ManualAssignmentType.create = function create(properties) { + return new ManualAssignmentType(properties); + }; - /** - * LineItem lineItemId. - * @member {string} lineItemId - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem - * @instance - */ - LineItem.prototype.lineItemId = ""; + /** + * Encodes the specified ManualAssignmentType message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType} message ManualAssignmentType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManualAssignmentType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; - /** - * LineItem lineItemInfo. - * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} lineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem - * @instance - */ - LineItem.prototype.lineItemInfo = null; + /** + * Encodes the specified ManualAssignmentType message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IManualAssignmentType} message ManualAssignmentType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManualAssignmentType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * LineItem pendingChange. - * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null|undefined} pendingChange - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem - * @instance - */ - LineItem.prototype.pendingChange = null; + /** + * Decodes a ManualAssignmentType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType} ManualAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManualAssignmentType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * LineItem changeHistory. - * @member {Array.} changeHistory - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem - * @instance - */ - LineItem.prototype.changeHistory = $util.emptyArray; + /** + * Decodes a ManualAssignmentType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType} ManualAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManualAssignmentType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Creates a new LineItem instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + /** + * Verifies a ManualAssignmentType message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManualAssignmentType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ManualAssignmentType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType} ManualAssignmentType + */ + ManualAssignmentType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType) + return object; + return new $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType(); + }; + + /** + * Creates a plain object from a ManualAssignmentType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType} message ManualAssignmentType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManualAssignmentType.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ManualAssignmentType to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @instance + * @returns {Object.} JSON object + */ + ManualAssignmentType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManualAssignmentType + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManualAssignmentType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.ManualAssignmentType"; + }; + + return ManualAssignmentType; + })(); + + AssignmentProtocol.AutoAssignmentType = (function() { + + /** + * Properties of an AutoAssignmentType. + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @interface IAutoAssignmentType + * @property {google.protobuf.IDuration|null} [inactiveLicenseTtl] AutoAssignmentType inactiveLicenseTtl + */ + + /** + * Constructs a new AutoAssignmentType. + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol + * @classdesc Represents an AutoAssignmentType. + * @implements IAutoAssignmentType + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType=} [properties] Properties to set + */ + function AutoAssignmentType(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AutoAssignmentType inactiveLicenseTtl. + * @member {google.protobuf.IDuration|null|undefined} inactiveLicenseTtl + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @instance + */ + AutoAssignmentType.prototype.inactiveLicenseTtl = null; + + /** + * Creates a new AutoAssignmentType instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType} AutoAssignmentType instance + */ + AutoAssignmentType.create = function create(properties) { + return new AutoAssignmentType(properties); + }; + + /** + * Encodes the specified AutoAssignmentType message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType} message AutoAssignmentType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoAssignmentType.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.inactiveLicenseTtl != null && Object.hasOwnProperty.call(message, "inactiveLicenseTtl")) + $root.google.protobuf.Duration.encode(message.inactiveLicenseTtl, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified AutoAssignmentType message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.IAutoAssignmentType} message AutoAssignmentType message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AutoAssignmentType.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AutoAssignmentType message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType} AutoAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoAssignmentType.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.inactiveLicenseTtl = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AutoAssignmentType message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType} AutoAssignmentType + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AutoAssignmentType.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AutoAssignmentType message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AutoAssignmentType.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.inactiveLicenseTtl != null && message.hasOwnProperty("inactiveLicenseTtl")) { + var error = $root.google.protobuf.Duration.verify(message.inactiveLicenseTtl); + if (error) + return "inactiveLicenseTtl." + error; + } + return null; + }; + + /** + * Creates an AutoAssignmentType message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType} AutoAssignmentType + */ + AutoAssignmentType.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType(); + if (object.inactiveLicenseTtl != null) { + if (typeof object.inactiveLicenseTtl !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType.inactiveLicenseTtl: object expected"); + message.inactiveLicenseTtl = $root.google.protobuf.Duration.fromObject(object.inactiveLicenseTtl); + } + return message; + }; + + /** + * Creates a plain object from an AutoAssignmentType message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType} message AutoAssignmentType + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AutoAssignmentType.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.inactiveLicenseTtl = null; + if (message.inactiveLicenseTtl != null && message.hasOwnProperty("inactiveLicenseTtl")) + object.inactiveLicenseTtl = $root.google.protobuf.Duration.toObject(message.inactiveLicenseTtl, options); + return object; + }; + + /** + * Converts this AutoAssignmentType to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @instance + * @returns {Object.} JSON object + */ + AutoAssignmentType.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AutoAssignmentType + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AutoAssignmentType.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.AutoAssignmentType"; + }; + + return AutoAssignmentType; + })(); + + return AssignmentProtocol; + })(); + + v1.LicensePool = (function() { + + /** + * Properties of a LicensePool. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface ILicensePool + * @property {string|null} [name] LicensePool name + * @property {google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol|null} [licenseAssignmentProtocol] LicensePool licenseAssignmentProtocol + * @property {number|null} [availableLicenseCount] LicensePool availableLicenseCount + * @property {number|null} [totalLicenseCount] LicensePool totalLicenseCount + */ + + /** + * Constructs a new LicensePool. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a LicensePool. + * @implements ILicensePool + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensePool=} [properties] Properties to set + */ + function LicensePool(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LicensePool name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool + * @instance + */ + LicensePool.prototype.name = ""; + + /** + * LicensePool licenseAssignmentProtocol. + * @member {google.cloud.commerce.consumer.procurement.v1.IAssignmentProtocol|null|undefined} licenseAssignmentProtocol + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool + * @instance + */ + LicensePool.prototype.licenseAssignmentProtocol = null; + + /** + * LicensePool availableLicenseCount. + * @member {number} availableLicenseCount + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool + * @instance + */ + LicensePool.prototype.availableLicenseCount = 0; + + /** + * LicensePool totalLicenseCount. + * @member {number} totalLicenseCount + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool + * @instance + */ + LicensePool.prototype.totalLicenseCount = 0; + + /** + * Creates a new LicensePool instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem instance + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensePool=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensePool} LicensePool instance */ - LineItem.create = function create(properties) { - return new LineItem(properties); + LicensePool.create = function create(properties) { + return new LicensePool(properties); }; /** - * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. + * Encodes the specified LicensePool message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensePool.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem} message LineItem message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensePool} message LicensePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItem.encode = function encode(message, writer) { + LicensePool.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lineItemId != null && Object.hasOwnProperty.call(message, "lineItemId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lineItemId); - if (message.lineItemInfo != null && Object.hasOwnProperty.call(message, "lineItemInfo")) - $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.lineItemInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pendingChange != null && Object.hasOwnProperty.call(message, "pendingChange")) - $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.encode(message.pendingChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.changeHistory != null && message.changeHistory.length) - for (var i = 0; i < message.changeHistory.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.encode(message.changeHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.licenseAssignmentProtocol != null && Object.hasOwnProperty.call(message, "licenseAssignmentProtocol")) + $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.encode(message.licenseAssignmentProtocol, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.availableLicenseCount != null && Object.hasOwnProperty.call(message, "availableLicenseCount")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.availableLicenseCount); + if (message.totalLicenseCount != null && Object.hasOwnProperty.call(message, "totalLicenseCount")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.totalLicenseCount); return writer; }; /** - * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. + * Encodes the specified LicensePool message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensePool.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem} message LineItem message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensePool} message LicensePool message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItem.encodeDelimited = function encodeDelimited(message, writer) { + LicensePool.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LineItem message from the specified reader or buffer. + * Decodes a LicensePool message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensePool} LicensePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItem.decode = function decode(reader, length) { + LicensePool.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItem(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LicensePool(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.lineItemId = reader.string(); + message.name = reader.string(); break; } case 2: { - message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); + message.licenseAssignmentProtocol = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.decode(reader, reader.uint32()); break; } case 3: { - message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.decode(reader, reader.uint32()); + message.availableLicenseCount = reader.int32(); break; } case 4: { - if (!(message.changeHistory && message.changeHistory.length)) - message.changeHistory = []; - message.changeHistory.push($root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.decode(reader, reader.uint32())); + message.totalLicenseCount = reader.int32(); break; } default: @@ -696,184 +1079,152 @@ }; /** - * Decodes a LineItem message from the specified reader or buffer, length delimited. + * Decodes a LicensePool message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensePool} LicensePool * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItem.decodeDelimited = function decodeDelimited(reader) { + LicensePool.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LineItem message. + * Verifies a LicensePool message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LineItem.verify = function verify(message) { + LicensePool.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) - if (!$util.isString(message.lineItemId)) - return "lineItemId: string expected"; - if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.lineItemInfo); - if (error) - return "lineItemInfo." + error; - } - if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify(message.pendingChange); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.licenseAssignmentProtocol != null && message.hasOwnProperty("licenseAssignmentProtocol")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.verify(message.licenseAssignmentProtocol); if (error) - return "pendingChange." + error; - } - if (message.changeHistory != null && message.hasOwnProperty("changeHistory")) { - if (!Array.isArray(message.changeHistory)) - return "changeHistory: array expected"; - for (var i = 0; i < message.changeHistory.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify(message.changeHistory[i]); - if (error) - return "changeHistory." + error; - } + return "licenseAssignmentProtocol." + error; } + if (message.availableLicenseCount != null && message.hasOwnProperty("availableLicenseCount")) + if (!$util.isInteger(message.availableLicenseCount)) + return "availableLicenseCount: integer expected"; + if (message.totalLicenseCount != null && message.hasOwnProperty("totalLicenseCount")) + if (!$util.isInteger(message.totalLicenseCount)) + return "totalLicenseCount: integer expected"; return null; }; /** - * Creates a LineItem message from a plain object. Also converts values to their respective internal types. + * Creates a LicensePool message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensePool} LicensePool */ - LineItem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LineItem) + LicensePool.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LicensePool) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItem(); - if (object.lineItemId != null) - message.lineItemId = String(object.lineItemId); - if (object.lineItemInfo != null) { - if (typeof object.lineItemInfo !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.lineItemInfo: object expected"); - message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.lineItemInfo); - } - if (object.pendingChange != null) { - if (typeof object.pendingChange !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.pendingChange: object expected"); - message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.fromObject(object.pendingChange); - } - if (object.changeHistory) { - if (!Array.isArray(object.changeHistory)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.changeHistory: array expected"); - message.changeHistory = []; - for (var i = 0; i < object.changeHistory.length; ++i) { - if (typeof object.changeHistory[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.changeHistory: object expected"); - message.changeHistory[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.fromObject(object.changeHistory[i]); - } + var message = new $root.google.cloud.commerce.consumer.procurement.v1.LicensePool(); + if (object.name != null) + message.name = String(object.name); + if (object.licenseAssignmentProtocol != null) { + if (typeof object.licenseAssignmentProtocol !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LicensePool.licenseAssignmentProtocol: object expected"); + message.licenseAssignmentProtocol = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.fromObject(object.licenseAssignmentProtocol); } + if (object.availableLicenseCount != null) + message.availableLicenseCount = object.availableLicenseCount | 0; + if (object.totalLicenseCount != null) + message.totalLicenseCount = object.totalLicenseCount | 0; return message; }; /** - * Creates a plain object from a LineItem message. Also converts values to other types if specified. + * Creates a plain object from a LicensePool message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static - * @param {google.cloud.commerce.consumer.procurement.v1.LineItem} message LineItem + * @param {google.cloud.commerce.consumer.procurement.v1.LicensePool} message LicensePool * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LineItem.toObject = function toObject(message, options) { + LicensePool.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.changeHistory = []; if (options.defaults) { - object.lineItemId = ""; - object.lineItemInfo = null; - object.pendingChange = null; - } - if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) - object.lineItemId = message.lineItemId; - if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) - object.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.lineItemInfo, options); - if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) - object.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.toObject(message.pendingChange, options); - if (message.changeHistory && message.changeHistory.length) { - object.changeHistory = []; - for (var j = 0; j < message.changeHistory.length; ++j) - object.changeHistory[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.toObject(message.changeHistory[j], options); + object.name = ""; + object.licenseAssignmentProtocol = null; + object.availableLicenseCount = 0; + object.totalLicenseCount = 0; } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.licenseAssignmentProtocol != null && message.hasOwnProperty("licenseAssignmentProtocol")) + object.licenseAssignmentProtocol = $root.google.cloud.commerce.consumer.procurement.v1.AssignmentProtocol.toObject(message.licenseAssignmentProtocol, options); + if (message.availableLicenseCount != null && message.hasOwnProperty("availableLicenseCount")) + object.availableLicenseCount = message.availableLicenseCount; + if (message.totalLicenseCount != null && message.hasOwnProperty("totalLicenseCount")) + object.totalLicenseCount = message.totalLicenseCount; return object; }; /** - * Converts this LineItem to JSON. + * Converts this LicensePool to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @instance * @returns {Object.} JSON object */ - LineItem.prototype.toJSON = function toJSON() { + LicensePool.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LineItem + * Gets the default type url for LicensePool * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensePool * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LineItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LicensePool.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LineItem"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LicensePool"; }; - return LineItem; + return LicensePool; })(); - v1.LineItemChange = (function() { + v1.GetLicensePoolRequest = (function() { /** - * Properties of a LineItemChange. + * Properties of a GetLicensePoolRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface ILineItemChange - * @property {string|null} [changeId] LineItemChange changeId - * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|null} [changeType] LineItemChange changeType - * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [oldLineItemInfo] LineItemChange oldLineItemInfo - * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [newLineItemInfo] LineItemChange newLineItemInfo - * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|null} [changeState] LineItemChange changeState - * @property {string|null} [stateReason] LineItemChange stateReason - * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|null} [changeStateReasonType] LineItemChange changeStateReasonType - * @property {google.protobuf.ITimestamp|null} [changeEffectiveTime] LineItemChange changeEffectiveTime - * @property {google.protobuf.ITimestamp|null} [createTime] LineItemChange createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LineItemChange updateTime + * @interface IGetLicensePoolRequest + * @property {string|null} [name] GetLicensePoolRequest name */ /** - * Constructs a new LineItemChange. + * Constructs a new GetLicensePoolRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a LineItemChange. - * @implements ILineItemChange + * @classdesc Represents a GetLicensePoolRequest. + * @implements IGetLicensePoolRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest=} [properties] Properties to set */ - function LineItemChange(properties) { + function GetLicensePoolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -881,201 +1232,75 @@ } /** - * LineItemChange changeId. - * @member {string} changeId - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeId = ""; - - /** - * LineItemChange changeType. - * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeType} changeType - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeType = 0; - - /** - * LineItemChange oldLineItemInfo. - * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} oldLineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.oldLineItemInfo = null; - - /** - * LineItemChange newLineItemInfo. - * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} newLineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.newLineItemInfo = null; - - /** - * LineItemChange changeState. - * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeState} changeState - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeState = 0; - - /** - * LineItemChange stateReason. - * @member {string} stateReason - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.stateReason = ""; - - /** - * LineItemChange changeStateReasonType. - * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType} changeStateReasonType - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeStateReasonType = 0; - - /** - * LineItemChange changeEffectiveTime. - * @member {google.protobuf.ITimestamp|null|undefined} changeEffectiveTime - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeEffectiveTime = null; - - /** - * LineItemChange createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange - * @instance - */ - LineItemChange.prototype.createTime = null; - - /** - * LineItemChange updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * GetLicensePoolRequest name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @instance */ - LineItemChange.prototype.updateTime = null; + GetLicensePoolRequest.prototype.name = ""; /** - * Creates a new LineItemChange instance using the specified properties. + * Creates a new GetLicensePoolRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange instance + * @param {google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest} GetLicensePoolRequest instance */ - LineItemChange.create = function create(properties) { - return new LineItemChange(properties); + GetLicensePoolRequest.create = function create(properties) { + return new GetLicensePoolRequest(properties); }; /** - * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. + * Encodes the specified GetLicensePoolRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange} message LineItemChange message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest} message GetLicensePoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItemChange.encode = function encode(message, writer) { + GetLicensePoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.changeId != null && Object.hasOwnProperty.call(message, "changeId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.changeId); - if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.changeType); - if (message.oldLineItemInfo != null && Object.hasOwnProperty.call(message, "oldLineItemInfo")) - $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.oldLineItemInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.newLineItemInfo != null && Object.hasOwnProperty.call(message, "newLineItemInfo")) - $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.newLineItemInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.changeState != null && Object.hasOwnProperty.call(message, "changeState")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeState); - if (message.stateReason != null && Object.hasOwnProperty.call(message, "stateReason")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.stateReason); - if (message.changeEffectiveTime != null && Object.hasOwnProperty.call(message, "changeEffectiveTime")) - $root.google.protobuf.Timestamp.encode(message.changeEffectiveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.changeStateReasonType != null && Object.hasOwnProperty.call(message, "changeStateReasonType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.changeStateReasonType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. + * Encodes the specified GetLicensePoolRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange} message LineItemChange message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest} message GetLicensePoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItemChange.encodeDelimited = function encodeDelimited(message, writer) { + GetLicensePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LineItemChange message from the specified reader or buffer. + * Decodes a GetLicensePoolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange + * @returns {google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest} GetLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItemChange.decode = function decode(reader, length) { + GetLicensePoolRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.changeId = reader.string(); - break; - } - case 2: { - message.changeType = reader.int32(); - break; - } - case 3: { - message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.changeState = reader.int32(); - break; - } - case 6: { - message.stateReason = reader.string(); - break; - } - case 10: { - message.changeStateReasonType = reader.int32(); - break; - } - case 7: { - message.changeEffectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -1087,330 +1312,123 @@ }; /** - * Decodes a LineItemChange message from the specified reader or buffer, length delimited. + * Decodes a GetLicensePoolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange + * @returns {google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest} GetLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItemChange.decodeDelimited = function decodeDelimited(reader) { + GetLicensePoolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LineItemChange message. + * Verifies a GetLicensePoolRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LineItemChange.verify = function verify(message) { + GetLicensePoolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.changeId != null && message.hasOwnProperty("changeId")) - if (!$util.isString(message.changeId)) - return "changeId: string expected"; - if (message.changeType != null && message.hasOwnProperty("changeType")) - switch (message.changeType) { - default: - return "changeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.oldLineItemInfo); - if (error) - return "oldLineItemInfo." + error; - } - if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.newLineItemInfo); - if (error) - return "newLineItemInfo." + error; - } - if (message.changeState != null && message.hasOwnProperty("changeState")) - switch (message.changeState) { - default: - return "changeState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.stateReason != null && message.hasOwnProperty("stateReason")) - if (!$util.isString(message.stateReason)) - return "stateReason: string expected"; - if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) - switch (message.changeStateReasonType) { - default: - return "changeStateReasonType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.changeEffectiveTime); - if (error) - return "changeEffectiveTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); - if (error) - return "updateTime." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a LineItemChange message from a plain object. Also converts values to their respective internal types. + * Creates a GetLicensePoolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange + * @returns {google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest} GetLicensePoolRequest */ - LineItemChange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange) + GetLicensePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange(); - if (object.changeId != null) - message.changeId = String(object.changeId); - switch (object.changeType) { - default: - if (typeof object.changeType === "number") { - message.changeType = object.changeType; - break; - } - break; - case "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED": - case 0: - message.changeType = 0; - break; - case "LINE_ITEM_CHANGE_TYPE_CREATE": - case 1: - message.changeType = 1; - break; - case "LINE_ITEM_CHANGE_TYPE_UPDATE": - case 2: - message.changeType = 2; - break; - case "LINE_ITEM_CHANGE_TYPE_CANCEL": - case 3: - message.changeType = 3; - break; - case "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION": - case 4: - message.changeType = 4; - break; - } - if (object.oldLineItemInfo != null) { - if (typeof object.oldLineItemInfo !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.oldLineItemInfo: object expected"); - message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.oldLineItemInfo); - } - if (object.newLineItemInfo != null) { - if (typeof object.newLineItemInfo !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.newLineItemInfo: object expected"); - message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.newLineItemInfo); - } - switch (object.changeState) { - default: - if (typeof object.changeState === "number") { - message.changeState = object.changeState; - break; - } - break; - case "LINE_ITEM_CHANGE_STATE_UNSPECIFIED": - case 0: - message.changeState = 0; - break; - case "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL": - case 1: - message.changeState = 1; - break; - case "LINE_ITEM_CHANGE_STATE_APPROVED": - case 2: - message.changeState = 2; - break; - case "LINE_ITEM_CHANGE_STATE_COMPLETED": - case 3: - message.changeState = 3; - break; - case "LINE_ITEM_CHANGE_STATE_REJECTED": - case 4: - message.changeState = 4; - break; - case "LINE_ITEM_CHANGE_STATE_ABANDONED": - case 5: - message.changeState = 5; - break; - case "LINE_ITEM_CHANGE_STATE_ACTIVATING": - case 6: - message.changeState = 6; - break; - } - if (object.stateReason != null) - message.stateReason = String(object.stateReason); - switch (object.changeStateReasonType) { - default: - if (typeof object.changeStateReasonType === "number") { - message.changeStateReasonType = object.changeStateReasonType; - break; - } - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED": - case 0: - message.changeStateReasonType = 0; - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED": - case 1: - message.changeStateReasonType = 1; - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED": - case 2: - message.changeStateReasonType = 2; - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED": - case 3: - message.changeStateReasonType = 3; - break; - } - if (object.changeEffectiveTime != null) { - if (typeof object.changeEffectiveTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.changeEffectiveTime: object expected"); - message.changeEffectiveTime = $root.google.protobuf.Timestamp.fromObject(object.changeEffectiveTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); - } + var message = new $root.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. + * Creates a plain object from a GetLicensePoolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.LineItemChange} message LineItemChange + * @param {google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest} message GetLicensePoolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LineItemChange.toObject = function toObject(message, options) { + GetLicensePoolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.changeId = ""; - object.changeType = options.enums === String ? "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED" : 0; - object.oldLineItemInfo = null; - object.newLineItemInfo = null; - object.changeState = options.enums === String ? "LINE_ITEM_CHANGE_STATE_UNSPECIFIED" : 0; - object.stateReason = ""; - object.changeEffectiveTime = null; - object.createTime = null; - object.updateTime = null; - object.changeStateReasonType = options.enums === String ? "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED" : 0; - } - if (message.changeId != null && message.hasOwnProperty("changeId")) - object.changeId = message.changeId; - if (message.changeType != null && message.hasOwnProperty("changeType")) - object.changeType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeType[message.changeType] === undefined ? message.changeType : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeType[message.changeType] : message.changeType; - if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) - object.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.oldLineItemInfo, options); - if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) - object.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.newLineItemInfo, options); - if (message.changeState != null && message.hasOwnProperty("changeState")) - object.changeState = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeState[message.changeState] === undefined ? message.changeState : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeState[message.changeState] : message.changeState; - if (message.stateReason != null && message.hasOwnProperty("stateReason")) - object.stateReason = message.stateReason; - if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) - object.changeEffectiveTime = $root.google.protobuf.Timestamp.toObject(message.changeEffectiveTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) - object.changeStateReasonType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType[message.changeStateReasonType] === undefined ? message.changeStateReasonType : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType[message.changeStateReasonType] : message.changeStateReasonType; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this LineItemChange to JSON. + * Converts this GetLicensePoolRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @instance * @returns {Object.} JSON object */ - LineItemChange.prototype.toJSON = function toJSON() { + GetLicensePoolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LineItemChange + * Gets the default type url for GetLicensePoolRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LineItemChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetLicensePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LineItemChange"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest"; }; - return LineItemChange; + return GetLicensePoolRequest; })(); - v1.LineItemInfo = (function() { + v1.UpdateLicensePoolRequest = (function() { /** - * Properties of a LineItemInfo. + * Properties of an UpdateLicensePoolRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface ILineItemInfo - * @property {string|null} [offer] LineItemInfo offer - * @property {Array.|null} [parameters] LineItemInfo parameters - * @property {google.cloud.commerce.consumer.procurement.v1.ISubscription|null} [subscription] LineItemInfo subscription + * @interface IUpdateLicensePoolRequest + * @property {google.cloud.commerce.consumer.procurement.v1.ILicensePool|null} [licensePool] UpdateLicensePoolRequest licensePool + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateLicensePoolRequest updateMask */ /** - * Constructs a new LineItemInfo. + * Constructs a new UpdateLicensePoolRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a LineItemInfo. - * @implements ILineItemInfo + * @classdesc Represents an UpdateLicensePoolRequest. + * @implements IUpdateLicensePoolRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest=} [properties] Properties to set */ - function LineItemInfo(properties) { - this.parameters = []; + function UpdateLicensePoolRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1418,106 +1436,89 @@ } /** - * LineItemInfo offer. - * @member {string} offer - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo - * @instance - */ - LineItemInfo.prototype.offer = ""; - - /** - * LineItemInfo parameters. - * @member {Array.} parameters - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * UpdateLicensePoolRequest licensePool. + * @member {google.cloud.commerce.consumer.procurement.v1.ILicensePool|null|undefined} licensePool + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @instance */ - LineItemInfo.prototype.parameters = $util.emptyArray; + UpdateLicensePoolRequest.prototype.licensePool = null; /** - * LineItemInfo subscription. - * @member {google.cloud.commerce.consumer.procurement.v1.ISubscription|null|undefined} subscription - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * UpdateLicensePoolRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @instance */ - LineItemInfo.prototype.subscription = null; + UpdateLicensePoolRequest.prototype.updateMask = null; /** - * Creates a new LineItemInfo instance using the specified properties. + * Creates a new UpdateLicensePoolRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo instance + * @param {google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest} UpdateLicensePoolRequest instance */ - LineItemInfo.create = function create(properties) { - return new LineItemInfo(properties); + UpdateLicensePoolRequest.create = function create(properties) { + return new UpdateLicensePoolRequest(properties); }; /** - * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. + * Encodes the specified UpdateLicensePoolRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo} message LineItemInfo message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest} message UpdateLicensePoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItemInfo.encode = function encode(message, writer) { + UpdateLicensePoolRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1.Parameter.encode(message.parameters[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - $root.google.cloud.commerce.consumer.procurement.v1.Subscription.encode(message.subscription, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.offer != null && Object.hasOwnProperty.call(message, "offer")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.offer); + if (message.licensePool != null && Object.hasOwnProperty.call(message, "licensePool")) + $root.google.cloud.commerce.consumer.procurement.v1.LicensePool.encode(message.licensePool, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. + * Encodes the specified UpdateLicensePoolRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo} message LineItemInfo message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest} message UpdateLicensePoolRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItemInfo.encodeDelimited = function encodeDelimited(message, writer) { + UpdateLicensePoolRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LineItemInfo message from the specified reader or buffer. + * Decodes an UpdateLicensePoolRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo + * @returns {google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest} UpdateLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItemInfo.decode = function decode(reader, length) { + UpdateLicensePoolRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 13: { - message.offer = reader.string(); - break; - } - case 9: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.commerce.consumer.procurement.v1.Parameter.decode(reader, reader.uint32())); + case 1: { + message.licensePool = $root.google.cloud.commerce.consumer.procurement.v1.LicensePool.decode(reader, reader.uint32()); break; } - case 10: { - message.subscription = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.decode(reader, reader.uint32()); + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -1529,163 +1530,143 @@ }; /** - * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. + * Decodes an UpdateLicensePoolRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo + * @returns {google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest} UpdateLicensePoolRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItemInfo.decodeDelimited = function decodeDelimited(reader) { + UpdateLicensePoolRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LineItemInfo message. + * Verifies an UpdateLicensePoolRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LineItemInfo.verify = function verify(message) { + UpdateLicensePoolRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.offer != null && message.hasOwnProperty("offer")) - if (!$util.isString(message.offer)) - return "offer: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } + if (message.licensePool != null && message.hasOwnProperty("licensePool")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LicensePool.verify(message.licensePool); + if (error) + return "licensePool." + error; } - if (message.subscription != null && message.hasOwnProperty("subscription")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.verify(message.subscription); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); if (error) - return "subscription." + error; + return "updateMask." + error; } return null; }; /** - * Creates a LineItemInfo message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateLicensePoolRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo + * @returns {google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest} UpdateLicensePoolRequest */ - LineItemInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo) + UpdateLicensePoolRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo(); - if (object.offer != null) - message.offer = String(object.offer); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemInfo.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemInfo.parameters: object expected"); - message.parameters[i] = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.fromObject(object.parameters[i]); - } + var message = new $root.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest(); + if (object.licensePool != null) { + if (typeof object.licensePool !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest.licensePool: object expected"); + message.licensePool = $root.google.cloud.commerce.consumer.procurement.v1.LicensePool.fromObject(object.licensePool); } - if (object.subscription != null) { - if (typeof object.subscription !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemInfo.subscription: object expected"); - message.subscription = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.fromObject(object.subscription); + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); } return message; }; /** - * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. + * Creates a plain object from an UpdateLicensePoolRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} message LineItemInfo + * @param {google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest} message UpdateLicensePoolRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LineItemInfo.toObject = function toObject(message, options) { + UpdateLicensePoolRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; if (options.defaults) { - object.subscription = null; - object.offer = ""; - } - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.toObject(message.parameters[j], options); + object.licensePool = null; + object.updateMask = null; } - if (message.subscription != null && message.hasOwnProperty("subscription")) - object.subscription = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.toObject(message.subscription, options); - if (message.offer != null && message.hasOwnProperty("offer")) - object.offer = message.offer; + if (message.licensePool != null && message.hasOwnProperty("licensePool")) + object.licensePool = $root.google.cloud.commerce.consumer.procurement.v1.LicensePool.toObject(message.licensePool, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this LineItemInfo to JSON. + * Converts this UpdateLicensePoolRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @instance * @returns {Object.} JSON object */ - LineItemInfo.prototype.toJSON = function toJSON() { + UpdateLicensePoolRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LineItemInfo + * Gets the default type url for UpdateLicensePoolRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LineItemInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateLicensePoolRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LineItemInfo"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest"; }; - return LineItemInfo; + return UpdateLicensePoolRequest; })(); - v1.Parameter = (function() { + v1.AssignRequest = (function() { /** - * Properties of a Parameter. + * Properties of an AssignRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IParameter - * @property {string|null} [name] Parameter name - * @property {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null} [value] Parameter value + * @interface IAssignRequest + * @property {string|null} [parent] AssignRequest parent + * @property {Array.|null} [usernames] AssignRequest usernames */ /** - * Constructs a new Parameter. + * Constructs a new AssignRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a Parameter. - * @implements IParameter + * @classdesc Represents an AssignRequest. + * @implements IAssignRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IParameter=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignRequest=} [properties] Properties to set */ - function Parameter(properties) { + function AssignRequest(properties) { + this.usernames = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -1693,89 +1674,92 @@ } /** - * Parameter name. - * @member {string} name - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * AssignRequest parent. + * @member {string} parent + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @instance */ - Parameter.prototype.name = ""; + AssignRequest.prototype.parent = ""; /** - * Parameter value. - * @member {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null|undefined} value - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * AssignRequest usernames. + * @member {Array.} usernames + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @instance */ - Parameter.prototype.value = null; + AssignRequest.prototype.usernames = $util.emptyArray; /** - * Creates a new Parameter instance using the specified properties. + * Creates a new AssignRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IParameter=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter instance + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignRequest} AssignRequest instance */ - Parameter.create = function create(properties) { - return new Parameter(properties); + AssignRequest.create = function create(properties) { + return new AssignRequest(properties); }; /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. + * Encodes the specified AssignRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IParameter} message Parameter message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignRequest} message AssignRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Parameter.encode = function encode(message, writer) { + AssignRequest.encode = function encode(message, writer) { if (!writer) 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 && Object.hasOwnProperty.call(message, "value")) - $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.usernames != null && message.usernames.length) + for (var i = 0; i < message.usernames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.usernames[i]); return writer; }; /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. + * Encodes the specified AssignRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IParameter} message Parameter message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignRequest} message AssignRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { + AssignRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Parameter message from the specified reader or buffer. + * Decodes an AssignRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignRequest} AssignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Parameter.decode = function decode(reader, length) { + AssignRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.parent = reader.string(); break; } case 2: { - message.value = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.decode(reader, reader.uint32()); + if (!(message.usernames && message.usernames.length)) + message.usernames = []; + message.usernames.push(reader.string()); break; } default: @@ -1787,531 +1771,413 @@ }; /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. + * Decodes an AssignRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignRequest} AssignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Parameter.decodeDelimited = function decodeDelimited(reader) { + AssignRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Parameter message. + * Verifies an AssignRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Parameter.verify = function verify(message) { + AssignRequest.verify = function verify(message) { if (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")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify(message.value); - if (error) - return "value." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.usernames != null && message.hasOwnProperty("usernames")) { + if (!Array.isArray(message.usernames)) + return "usernames: array expected"; + for (var i = 0; i < message.usernames.length; ++i) + if (!$util.isString(message.usernames[i])) + return "usernames: string[] expected"; } return null; }; /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * Creates an AssignRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignRequest} AssignRequest */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Parameter) + AssignRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.AssignRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Parameter.value: object expected"); - message.value = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.fromObject(object.value); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.usernames) { + if (!Array.isArray(object.usernames)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.AssignRequest.usernames: array expected"); + message.usernames = []; + for (var i = 0; i < object.usernames.length; ++i) + message.usernames[i] = String(object.usernames[i]); } return message; }; /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * Creates a plain object from an AssignRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Parameter} message Parameter + * @param {google.cloud.commerce.consumer.procurement.v1.AssignRequest} message AssignRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Parameter.toObject = function toObject(message, options) { + AssignRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.name = ""; - object.value = null; + if (options.arrays || options.defaults) + object.usernames = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.usernames && message.usernames.length) { + object.usernames = []; + for (var j = 0; j < message.usernames.length; ++j) + object.usernames[j] = message.usernames[j]; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.toObject(message.value, options); return object; }; /** - * Converts this Parameter to JSON. + * Converts this AssignRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @instance * @returns {Object.} JSON object */ - Parameter.prototype.toJSON = function toJSON() { + AssignRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Parameter + * Gets the default type url for AssignRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + AssignRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Parameter"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.AssignRequest"; }; - Parameter.Value = (function() { + return AssignRequest; + })(); - /** - * Properties of a Value. - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter - * @interface IValue - * @property {number|Long|null} [int64Value] Value int64Value - * @property {string|null} [stringValue] Value stringValue - * @property {number|null} [doubleValue] Value doubleValue - */ + v1.AssignResponse = (function() { - /** - * Constructs a new Value. - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; + /** + * Properties of an AssignResponse. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IAssignResponse + */ + + /** + * Constructs a new AssignResponse. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents an AssignResponse. + * @implements IAssignResponse + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignResponse=} [properties] Properties to set + */ + function AssignResponse(properties) { + if (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 AssignResponse instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignResponse=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignResponse} AssignResponse instance + */ + AssignResponse.create = function create(properties) { + return new AssignResponse(properties); + }; + + /** + * Encodes the specified AssignResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignResponse} message AssignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssignResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified AssignResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.AssignResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IAssignResponse} message AssignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AssignResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AssignResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignResponse} AssignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssignResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.AssignResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } } + return message; + }; - /** - * Value int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @instance - */ - Value.prototype.int64Value = null; + /** + * Decodes an AssignResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignResponse} AssignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AssignResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @instance - */ - Value.prototype.stringValue = null; + /** + * Verifies an AssignResponse message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AssignResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; - /** - * Value doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @instance - */ - Value.prototype.doubleValue = null; + /** + * Creates an AssignResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.AssignResponse} AssignResponse + */ + AssignResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.AssignResponse) + return object; + return new $root.google.cloud.commerce.consumer.procurement.v1.AssignResponse(); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Creates a plain object from an AssignResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.AssignResponse} message AssignResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AssignResponse.toObject = function toObject() { + return {}; + }; - /** - * Value kind. - * @member {"int64Value"|"stringValue"|"doubleValue"|undefined} kind - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "stringValue", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Converts this AssignResponse to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @instance + * @returns {Object.} JSON object + */ + AssignResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + /** + * Gets the default type url for AssignResponse + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.AssignResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AssignResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.AssignResponse"; + }; - /** - * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. - * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.int64Value); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.doubleValue); - return writer; - }; + return AssignResponse; + })(); - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + v1.UnassignRequest = (function() { - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.int64Value = reader.int64(); - break; - } - case 4: { - message.stringValue = reader.string(); - break; - } - case 5: { - message.doubleValue = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Properties of an UnassignRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IUnassignRequest + * @property {string|null} [parent] UnassignRequest parent + * @property {Array.|null} [usernames] UnassignRequest usernames + */ - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a Value message. - * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - properties.kind = 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.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - return null; - }; - - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value) - return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value(); - 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.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - return message; - }; - - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.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.kind = "int64Value"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.kind = "doubleValue"; - } - return object; - }; - - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Parameter.Value"; - }; - - return Value; - })(); - - return Parameter; - })(); - - v1.Subscription = (function() { - - /** - * Properties of a Subscription. - * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface ISubscription - * @property {google.protobuf.ITimestamp|null} [startTime] Subscription startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Subscription endTime - * @property {boolean|null} [autoRenewalEnabled] Subscription autoRenewalEnabled - */ - - /** - * Constructs a new Subscription. - * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a Subscription. - * @implements ISubscription - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription=} [properties] Properties to set - */ - function Subscription(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Subscription startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription - * @instance - */ - Subscription.prototype.startTime = null; + /** + * Constructs a new UnassignRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents an UnassignRequest. + * @implements IUnassignRequest + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignRequest=} [properties] Properties to set + */ + function UnassignRequest(properties) { + this.usernames = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * Subscription endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * UnassignRequest parent. + * @member {string} parent + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @instance */ - Subscription.prototype.endTime = null; + UnassignRequest.prototype.parent = ""; /** - * Subscription autoRenewalEnabled. - * @member {boolean} autoRenewalEnabled - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * UnassignRequest usernames. + * @member {Array.} usernames + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @instance */ - Subscription.prototype.autoRenewalEnabled = false; + UnassignRequest.prototype.usernames = $util.emptyArray; /** - * Creates a new Subscription instance using the specified properties. + * Creates a new UnassignRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription instance + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignRequest} UnassignRequest instance */ - Subscription.create = function create(properties) { - return new Subscription(properties); + UnassignRequest.create = function create(properties) { + return new UnassignRequest(properties); }; /** - * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. + * Encodes the specified UnassignRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription} message Subscription message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignRequest} message UnassignRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Subscription.encode = function encode(message, writer) { + UnassignRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.autoRenewalEnabled != null && Object.hasOwnProperty.call(message, "autoRenewalEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRenewalEnabled); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.usernames != null && message.usernames.length) + for (var i = 0; i < message.usernames.length; ++i) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.usernames[i]); return writer; }; /** - * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. + * Encodes the specified UnassignRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription} message Subscription message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignRequest} message UnassignRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Subscription.encodeDelimited = function encodeDelimited(message, writer) { + UnassignRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Subscription message from the specified reader or buffer. + * Decodes an UnassignRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignRequest} UnassignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Subscription.decode = function decode(reader, length) { + UnassignRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Subscription(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.UnassignRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } case 1: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } case 2: { - message.autoRenewalEnabled = reader.bool(); + if (!(message.usernames && message.usernames.length)) + message.usernames = []; + message.usernames.push(reader.string()); break; } default: @@ -2323,287 +2189,320 @@ }; /** - * Decodes a Subscription message from the specified reader or buffer, length delimited. + * Decodes an UnassignRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignRequest} UnassignRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Subscription.decodeDelimited = function decodeDelimited(reader) { + UnassignRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Subscription message. + * Verifies an UnassignRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Subscription.verify = function verify(message) { + UnassignRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.usernames != null && message.hasOwnProperty("usernames")) { + if (!Array.isArray(message.usernames)) + return "usernames: array expected"; + for (var i = 0; i < message.usernames.length; ++i) + if (!$util.isString(message.usernames[i])) + return "usernames: string[] expected"; } - if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) - if (typeof message.autoRenewalEnabled !== "boolean") - return "autoRenewalEnabled: boolean expected"; return null; }; /** - * Creates a Subscription message from a plain object. Also converts values to their respective internal types. + * Creates an UnassignRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignRequest} UnassignRequest */ - Subscription.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Subscription) + UnassignRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.UnassignRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.Subscription(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Subscription.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Subscription.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.UnassignRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.usernames) { + if (!Array.isArray(object.usernames)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.UnassignRequest.usernames: array expected"); + message.usernames = []; + for (var i = 0; i < object.usernames.length; ++i) + message.usernames[i] = String(object.usernames[i]); } - if (object.autoRenewalEnabled != null) - message.autoRenewalEnabled = Boolean(object.autoRenewalEnabled); return message; }; /** - * Creates a plain object from a Subscription message. Also converts values to other types if specified. + * Creates a plain object from an UnassignRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.Subscription} message Subscription + * @param {google.cloud.commerce.consumer.procurement.v1.UnassignRequest} message UnassignRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Subscription.toObject = function toObject(message, options) { + UnassignRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.endTime = null; - object.autoRenewalEnabled = false; - object.startTime = null; + if (options.arrays || options.defaults) + object.usernames = []; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.usernames && message.usernames.length) { + object.usernames = []; + for (var j = 0; j < message.usernames.length; ++j) + object.usernames[j] = message.usernames[j]; } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) - object.autoRenewalEnabled = message.autoRenewalEnabled; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this Subscription to JSON. + * Converts this UnassignRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @instance * @returns {Object.} JSON object */ - Subscription.prototype.toJSON = function toJSON() { + UnassignRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Subscription + * Gets the default type url for UnassignRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Subscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UnassignRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Subscription"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.UnassignRequest"; }; - return Subscription; + return UnassignRequest; })(); - v1.ConsumerProcurementService = (function() { + v1.UnassignResponse = (function() { /** - * Constructs a new ConsumerProcurementService service. + * Properties of an UnassignResponse. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a ConsumerProcurementService - * @extends $protobuf.rpc.Service + * @interface IUnassignResponse + */ + + /** + * Constructs a new UnassignResponse. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents an UnassignResponse. + * @implements IUnassignResponse * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignResponse=} [properties] Properties to set */ - function ConsumerProcurementService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function UnassignResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (ConsumerProcurementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConsumerProcurementService; - /** - * Creates new ConsumerProcurementService service using the specified rpc implementation. + * Creates a new UnassignResponse instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse * @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 {ConsumerProcurementService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignResponse=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignResponse} UnassignResponse instance */ - ConsumerProcurementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); + UnassignResponse.create = function create(properties) { + return new UnassignResponse(properties); }; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|placeOrder}. - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @typedef PlaceOrderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation + * Encodes the specified UnassignResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignResponse} message UnassignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ + UnassignResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; /** - * Calls PlaceOrder. - * @function placeOrder - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object - * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.PlaceOrderCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 + * Encodes the specified UnassignResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.UnassignResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IUnassignResponse} message UnassignResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer */ - Object.defineProperty(ConsumerProcurementService.prototype.placeOrder = function placeOrder(request, callback) { - return this.rpcCall(placeOrder, $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "PlaceOrder" }); + UnassignResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; /** - * Calls PlaceOrder. - * @function placeOrder - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Decodes an UnassignResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignResponse} UnassignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UnassignResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.UnassignResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|getOrder}. - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @typedef GetOrderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.commerce.consumer.procurement.v1.Order} [response] Order + * Decodes an UnassignResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignResponse} UnassignResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing */ + UnassignResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; /** - * Calls GetOrder. - * @function getOrder - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} request GetOrderRequest message or plain object - * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.GetOrderCallback} callback Node-style callback called with the error, if any, and Order - * @returns {undefined} - * @variation 1 + * Verifies an UnassignResponse message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Object.defineProperty(ConsumerProcurementService.prototype.getOrder = function getOrder(request, callback) { - return this.rpcCall(getOrder, $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest, $root.google.cloud.commerce.consumer.procurement.v1.Order, request, callback); - }, "name", { value: "GetOrder" }); + UnassignResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; /** - * Calls GetOrder. - * @function getOrder - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} request GetOrderRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Creates an UnassignResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.UnassignResponse} UnassignResponse */ + UnassignResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.UnassignResponse) + return object; + return new $root.google.cloud.commerce.consumer.procurement.v1.UnassignResponse(); + }; /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|listOrders}. - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @typedef ListOrdersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} [response] ListOrdersResponse + * Creates a plain object from an UnassignResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.UnassignResponse} message UnassignResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object */ + UnassignResponse.toObject = function toObject() { + return {}; + }; /** - * Calls ListOrders. - * @function listOrders - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * Converts this UnassignResponse to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse * @instance - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} request ListOrdersRequest message or plain object - * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ListOrdersCallback} callback Node-style callback called with the error, if any, and ListOrdersResponse - * @returns {undefined} - * @variation 1 + * @returns {Object.} JSON object */ - Object.defineProperty(ConsumerProcurementService.prototype.listOrders = function listOrders(request, callback) { - return this.rpcCall(listOrders, $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest, $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse, request, callback); - }, "name", { value: "ListOrders" }); + UnassignResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; /** - * Calls ListOrders. - * @function listOrders - * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} request ListOrdersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 + * Gets the default type url for UnassignResponse + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.UnassignResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url */ + UnassignResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.UnassignResponse"; + }; - return ConsumerProcurementService; + return UnassignResponse; })(); - v1.PlaceOrderRequest = (function() { + v1.EnumerateLicensedUsersRequest = (function() { /** - * Properties of a PlaceOrderRequest. + * Properties of an EnumerateLicensedUsersRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IPlaceOrderRequest - * @property {string|null} [parent] PlaceOrderRequest parent - * @property {string|null} [displayName] PlaceOrderRequest displayName - * @property {Array.|null} [lineItemInfo] PlaceOrderRequest lineItemInfo - * @property {string|null} [requestId] PlaceOrderRequest requestId + * @interface IEnumerateLicensedUsersRequest + * @property {string|null} [parent] EnumerateLicensedUsersRequest parent + * @property {number|null} [pageSize] EnumerateLicensedUsersRequest pageSize + * @property {string|null} [pageToken] EnumerateLicensedUsersRequest pageToken */ /** - * Constructs a new PlaceOrderRequest. + * Constructs a new EnumerateLicensedUsersRequest. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a PlaceOrderRequest. - * @implements IPlaceOrderRequest + * @classdesc Represents an EnumerateLicensedUsersRequest. + * @implements IEnumerateLicensedUsersRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest=} [properties] Properties to set */ - function PlaceOrderRequest(properties) { - this.lineItemInfo = []; + function EnumerateLicensedUsersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2611,101 +2510,90 @@ } /** - * PlaceOrderRequest parent. + * EnumerateLicensedUsersRequest parent. * @member {string} parent - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest - * @instance - */ - PlaceOrderRequest.prototype.parent = ""; - - /** - * PlaceOrderRequest displayName. - * @member {string} displayName - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @instance */ - PlaceOrderRequest.prototype.displayName = ""; + EnumerateLicensedUsersRequest.prototype.parent = ""; /** - * PlaceOrderRequest lineItemInfo. - * @member {Array.} lineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * EnumerateLicensedUsersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @instance */ - PlaceOrderRequest.prototype.lineItemInfo = $util.emptyArray; + EnumerateLicensedUsersRequest.prototype.pageSize = 0; /** - * PlaceOrderRequest requestId. - * @member {string} requestId - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * EnumerateLicensedUsersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @instance */ - PlaceOrderRequest.prototype.requestId = ""; + EnumerateLicensedUsersRequest.prototype.pageToken = ""; /** - * Creates a new PlaceOrderRequest instance using the specified properties. + * Creates a new EnumerateLicensedUsersRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest instance + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest} EnumerateLicensedUsersRequest instance */ - PlaceOrderRequest.create = function create(properties) { - return new PlaceOrderRequest(properties); + EnumerateLicensedUsersRequest.create = function create(properties) { + return new EnumerateLicensedUsersRequest(properties); }; /** - * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. + * Encodes the specified EnumerateLicensedUsersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest} message EnumerateLicensedUsersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderRequest.encode = function encode(message, writer) { + EnumerateLicensedUsersRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.requestId); - if (message.lineItemInfo != null && message.lineItemInfo.length) - for (var i = 0; i < message.lineItemInfo.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.lineItemInfo[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); return writer; }; /** - * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. + * Encodes the specified EnumerateLicensedUsersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest} message EnumerateLicensedUsersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + EnumerateLicensedUsersRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlaceOrderRequest message from the specified reader or buffer. + * Decodes an EnumerateLicensedUsersRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest} EnumerateLicensedUsersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderRequest.decode = function decode(reader, length) { + EnumerateLicensedUsersRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -2713,18 +2601,12 @@ message.parent = reader.string(); break; } - case 6: { - message.displayName = reader.string(); + case 2: { + message.pageSize = reader.int32(); break; } - case 10: { - if (!(message.lineItemInfo && message.lineItemInfo.length)) - message.lineItemInfo = []; - message.lineItemInfo.push($root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32())); - break; - } - case 7: { - message.requestId = reader.string(); + case 3: { + message.pageToken = reader.string(); break; } default: @@ -2736,164 +2618,141 @@ }; /** - * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. + * Decodes an EnumerateLicensedUsersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest} EnumerateLicensedUsersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderRequest.decodeDelimited = function decodeDelimited(reader) { + EnumerateLicensedUsersRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlaceOrderRequest message. + * Verifies an EnumerateLicensedUsersRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlaceOrderRequest.verify = function verify(message) { + EnumerateLicensedUsersRequest.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { - if (!Array.isArray(message.lineItemInfo)) - return "lineItemInfo: array expected"; - for (var i = 0; i < message.lineItemInfo.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.lineItemInfo[i]); - if (error) - return "lineItemInfo." + error; - } - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: 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 PlaceOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EnumerateLicensedUsersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest} EnumerateLicensedUsersRequest */ - PlaceOrderRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest) + EnumerateLicensedUsersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest(); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest(); if (object.parent != null) message.parent = String(object.parent); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.lineItemInfo) { - if (!Array.isArray(object.lineItemInfo)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.lineItemInfo: array expected"); - message.lineItemInfo = []; - for (var i = 0; i < object.lineItemInfo.length; ++i) { - if (typeof object.lineItemInfo[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.lineItemInfo: object expected"); - message.lineItemInfo[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.lineItemInfo[i]); - } - } - if (object.requestId != null) - message.requestId = String(object.requestId); + 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 PlaceOrderRequest message. Also converts values to other types if specified. + * Creates a plain object from an EnumerateLicensedUsersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} message PlaceOrderRequest + * @param {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest} message EnumerateLicensedUsersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlaceOrderRequest.toObject = function toObject(message, options) { + EnumerateLicensedUsersRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.lineItemInfo = []; if (options.defaults) { object.parent = ""; - object.displayName = ""; - object.requestId = ""; + object.pageSize = 0; + object.pageToken = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.lineItemInfo && message.lineItemInfo.length) { - object.lineItemInfo = []; - for (var j = 0; j < message.lineItemInfo.length; ++j) - object.lineItemInfo[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.lineItemInfo[j], options); - } + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; return object; }; /** - * Converts this PlaceOrderRequest to JSON. + * Converts this EnumerateLicensedUsersRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @instance * @returns {Object.} JSON object */ - PlaceOrderRequest.prototype.toJSON = function toJSON() { + EnumerateLicensedUsersRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PlaceOrderRequest + * Gets the default type url for EnumerateLicensedUsersRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PlaceOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumerateLicensedUsersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest"; }; - return PlaceOrderRequest; + return EnumerateLicensedUsersRequest; })(); - v1.PlaceOrderMetadata = (function() { + v1.LicensedUser = (function() { /** - * Properties of a PlaceOrderMetadata. + * Properties of a LicensedUser. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IPlaceOrderMetadata + * @interface ILicensedUser + * @property {string|null} [username] LicensedUser username + * @property {google.protobuf.ITimestamp|null} [assignTime] LicensedUser assignTime + * @property {google.protobuf.ITimestamp|null} [recentUsageTime] LicensedUser recentUsageTime */ /** - * Constructs a new PlaceOrderMetadata. + * Constructs a new LicensedUser. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a PlaceOrderMetadata. - * @implements IPlaceOrderMetadata + * @classdesc Represents a LicensedUser. + * @implements ILicensedUser * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensedUser=} [properties] Properties to set */ - function PlaceOrderMetadata(properties) { + function LicensedUser(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2901,63 +2760,105 @@ } /** - * Creates a new PlaceOrderMetadata instance using the specified properties. + * LicensedUser username. + * @member {string} username + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser + * @instance + */ + LicensedUser.prototype.username = ""; + + /** + * LicensedUser assignTime. + * @member {google.protobuf.ITimestamp|null|undefined} assignTime + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser + * @instance + */ + LicensedUser.prototype.assignTime = null; + + /** + * LicensedUser recentUsageTime. + * @member {google.protobuf.ITimestamp|null|undefined} recentUsageTime + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser + * @instance + */ + LicensedUser.prototype.recentUsageTime = null; + + /** + * Creates a new LicensedUser instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata instance + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensedUser=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensedUser} LicensedUser instance */ - PlaceOrderMetadata.create = function create(properties) { - return new PlaceOrderMetadata(properties); + LicensedUser.create = function create(properties) { + return new LicensedUser(properties); }; /** - * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. + * Encodes the specified LicensedUser message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensedUser.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensedUser} message LicensedUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderMetadata.encode = function encode(message, writer) { + LicensedUser.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.username != null && Object.hasOwnProperty.call(message, "username")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.username); + if (message.assignTime != null && Object.hasOwnProperty.call(message, "assignTime")) + $root.google.protobuf.Timestamp.encode(message.assignTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.recentUsageTime != null && Object.hasOwnProperty.call(message, "recentUsageTime")) + $root.google.protobuf.Timestamp.encode(message.recentUsageTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. + * Encodes the specified LicensedUser message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LicensedUser.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILicensedUser} message LicensedUser message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + LicensedUser.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlaceOrderMetadata message from the specified reader or buffer. + * Decodes a LicensedUser message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensedUser} LicensedUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderMetadata.decode = function decode(reader, length) { + LicensedUser.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.username = reader.string(); + break; + } + case 2: { + message.assignTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.recentUsageTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -2967,109 +2868,151 @@ }; /** - * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. + * Decodes a LicensedUser message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensedUser} LicensedUser * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderMetadata.decodeDelimited = function decodeDelimited(reader) { + LicensedUser.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlaceOrderMetadata message. + * Verifies a LicensedUser message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlaceOrderMetadata.verify = function verify(message) { + LicensedUser.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.username != null && message.hasOwnProperty("username")) + if (!$util.isString(message.username)) + return "username: string expected"; + if (message.assignTime != null && message.hasOwnProperty("assignTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.assignTime); + if (error) + return "assignTime." + error; + } + if (message.recentUsageTime != null && message.hasOwnProperty("recentUsageTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.recentUsageTime); + if (error) + return "recentUsageTime." + error; + } return null; }; /** - * Creates a PlaceOrderMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a LicensedUser message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata + * @returns {google.cloud.commerce.consumer.procurement.v1.LicensedUser} LicensedUser */ - PlaceOrderMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata) + LicensedUser.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser) return object; - return new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata(); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser(); + if (object.username != null) + message.username = String(object.username); + if (object.assignTime != null) { + if (typeof object.assignTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LicensedUser.assignTime: object expected"); + message.assignTime = $root.google.protobuf.Timestamp.fromObject(object.assignTime); + } + if (object.recentUsageTime != null) { + if (typeof object.recentUsageTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LicensedUser.recentUsageTime: object expected"); + message.recentUsageTime = $root.google.protobuf.Timestamp.fromObject(object.recentUsageTime); + } + return message; }; /** - * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. + * Creates a plain object from a LicensedUser message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static - * @param {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} message PlaceOrderMetadata + * @param {google.cloud.commerce.consumer.procurement.v1.LicensedUser} message LicensedUser * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlaceOrderMetadata.toObject = function toObject() { - return {}; + LicensedUser.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.username = ""; + object.assignTime = null; + object.recentUsageTime = null; + } + if (message.username != null && message.hasOwnProperty("username")) + object.username = message.username; + if (message.assignTime != null && message.hasOwnProperty("assignTime")) + object.assignTime = $root.google.protobuf.Timestamp.toObject(message.assignTime, options); + if (message.recentUsageTime != null && message.hasOwnProperty("recentUsageTime")) + object.recentUsageTime = $root.google.protobuf.Timestamp.toObject(message.recentUsageTime, options); + return object; }; /** - * Converts this PlaceOrderMetadata to JSON. + * Converts this LicensedUser to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @instance * @returns {Object.} JSON object */ - PlaceOrderMetadata.prototype.toJSON = function toJSON() { + LicensedUser.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PlaceOrderMetadata + * Gets the default type url for LicensedUser * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.LicensedUser * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PlaceOrderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LicensedUser.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LicensedUser"; }; - return PlaceOrderMetadata; + return LicensedUser; })(); - v1.GetOrderRequest = (function() { + v1.EnumerateLicensedUsersResponse = (function() { /** - * Properties of a GetOrderRequest. + * Properties of an EnumerateLicensedUsersResponse. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IGetOrderRequest - * @property {string|null} [name] GetOrderRequest name + * @interface IEnumerateLicensedUsersResponse + * @property {Array.|null} [licensedUsers] EnumerateLicensedUsersResponse licensedUsers + * @property {string|null} [nextPageToken] EnumerateLicensedUsersResponse nextPageToken */ /** - * Constructs a new GetOrderRequest. + * Constructs a new EnumerateLicensedUsersResponse. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a GetOrderRequest. - * @implements IGetOrderRequest + * @classdesc Represents an EnumerateLicensedUsersResponse. + * @implements IEnumerateLicensedUsersResponse * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse=} [properties] Properties to set */ - function GetOrderRequest(properties) { + function EnumerateLicensedUsersResponse(properties) { + this.licensedUsers = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3077,75 +3020,92 @@ } /** - * GetOrderRequest name. - * @member {string} name - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * EnumerateLicensedUsersResponse licensedUsers. + * @member {Array.} licensedUsers + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @instance */ - GetOrderRequest.prototype.name = ""; + EnumerateLicensedUsersResponse.prototype.licensedUsers = $util.emptyArray; /** - * Creates a new GetOrderRequest instance using the specified properties. + * EnumerateLicensedUsersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse + * @instance + */ + EnumerateLicensedUsersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new EnumerateLicensedUsersResponse instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest instance + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse} EnumerateLicensedUsersResponse instance */ - GetOrderRequest.create = function create(properties) { - return new GetOrderRequest(properties); + EnumerateLicensedUsersResponse.create = function create(properties) { + return new EnumerateLicensedUsersResponse(properties); }; /** - * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. + * Encodes the specified EnumerateLicensedUsersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse} message EnumerateLicensedUsersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrderRequest.encode = function encode(message, writer) { + EnumerateLicensedUsersResponse.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.licensedUsers != null && message.licensedUsers.length) + for (var i = 0; i < message.licensedUsers.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser.encode(message.licensedUsers[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 GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. + * Encodes the specified EnumerateLicensedUsersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse} message EnumerateLicensedUsersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + EnumerateLicensedUsersResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetOrderRequest message from the specified reader or buffer. + * Decodes an EnumerateLicensedUsersResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse} EnumerateLicensedUsersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrderRequest.decode = function decode(reader, length) { + EnumerateLicensedUsersResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + if (!(message.licensedUsers && message.licensedUsers.length)) + message.licensedUsers = []; + message.licensedUsers.push($root.google.cloud.commerce.consumer.procurement.v1.LicensedUser.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); break; } default: @@ -3157,125 +3117,218 @@ }; /** - * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * Decodes an EnumerateLicensedUsersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse} EnumerateLicensedUsersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetOrderRequest.decodeDelimited = function decodeDelimited(reader) { + EnumerateLicensedUsersResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetOrderRequest message. + * Verifies an EnumerateLicensedUsersResponse message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetOrderRequest.verify = function verify(message) { + EnumerateLicensedUsersResponse.verify = function verify(message) { if (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.licensedUsers != null && message.hasOwnProperty("licensedUsers")) { + if (!Array.isArray(message.licensedUsers)) + return "licensedUsers: array expected"; + for (var i = 0; i < message.licensedUsers.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser.verify(message.licensedUsers[i]); + if (error) + return "licensedUsers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; return null; }; /** - * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates an EnumerateLicensedUsersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse} EnumerateLicensedUsersResponse */ - GetOrderRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest) + EnumerateLicensedUsersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse(); + if (object.licensedUsers) { + if (!Array.isArray(object.licensedUsers)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse.licensedUsers: array expected"); + message.licensedUsers = []; + for (var i = 0; i < object.licensedUsers.length; ++i) { + if (typeof object.licensedUsers[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse.licensedUsers: object expected"); + message.licensedUsers[i] = $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser.fromObject(object.licensedUsers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. + * Creates a plain object from an EnumerateLicensedUsersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} message GetOrderRequest + * @param {google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse} message EnumerateLicensedUsersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetOrderRequest.toObject = function toObject(message, options) { + EnumerateLicensedUsersResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.licensedUsers = []; if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; + object.nextPageToken = ""; + if (message.licensedUsers && message.licensedUsers.length) { + object.licensedUsers = []; + for (var j = 0; j < message.licensedUsers.length; ++j) + object.licensedUsers[j] = $root.google.cloud.commerce.consumer.procurement.v1.LicensedUser.toObject(message.licensedUsers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this GetOrderRequest to JSON. + * Converts this EnumerateLicensedUsersResponse to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @instance * @returns {Object.} JSON object */ - GetOrderRequest.prototype.toJSON = function toJSON() { + EnumerateLicensedUsersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetOrderRequest + * Gets the default type url for EnumerateLicensedUsersResponse * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + EnumerateLicensedUsersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.GetOrderRequest"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse"; }; - return GetOrderRequest; + return EnumerateLicensedUsersResponse; })(); - v1.ListOrdersRequest = (function() { + /** + * LineItemChangeType enum. + * @name google.cloud.commerce.consumer.procurement.v1.LineItemChangeType + * @enum {number} + * @property {number} LINE_ITEM_CHANGE_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_TYPE_UNSPECIFIED value + * @property {number} LINE_ITEM_CHANGE_TYPE_CREATE=1 LINE_ITEM_CHANGE_TYPE_CREATE value + * @property {number} LINE_ITEM_CHANGE_TYPE_UPDATE=2 LINE_ITEM_CHANGE_TYPE_UPDATE value + * @property {number} LINE_ITEM_CHANGE_TYPE_CANCEL=3 LINE_ITEM_CHANGE_TYPE_CANCEL value + * @property {number} LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION=4 LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION value + */ + v1.LineItemChangeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM_CHANGE_TYPE_CREATE"] = 1; + values[valuesById[2] = "LINE_ITEM_CHANGE_TYPE_UPDATE"] = 2; + values[valuesById[3] = "LINE_ITEM_CHANGE_TYPE_CANCEL"] = 3; + values[valuesById[4] = "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION"] = 4; + return values; + })(); + + /** + * LineItemChangeState enum. + * @name google.cloud.commerce.consumer.procurement.v1.LineItemChangeState + * @enum {number} + * @property {number} LINE_ITEM_CHANGE_STATE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_UNSPECIFIED value + * @property {number} LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL=1 LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL value + * @property {number} LINE_ITEM_CHANGE_STATE_APPROVED=2 LINE_ITEM_CHANGE_STATE_APPROVED value + * @property {number} LINE_ITEM_CHANGE_STATE_COMPLETED=3 LINE_ITEM_CHANGE_STATE_COMPLETED value + * @property {number} LINE_ITEM_CHANGE_STATE_REJECTED=4 LINE_ITEM_CHANGE_STATE_REJECTED value + * @property {number} LINE_ITEM_CHANGE_STATE_ABANDONED=5 LINE_ITEM_CHANGE_STATE_ABANDONED value + * @property {number} LINE_ITEM_CHANGE_STATE_ACTIVATING=6 LINE_ITEM_CHANGE_STATE_ACTIVATING value + */ + v1.LineItemChangeState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL"] = 1; + values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_APPROVED"] = 2; + values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_COMPLETED"] = 3; + values[valuesById[4] = "LINE_ITEM_CHANGE_STATE_REJECTED"] = 4; + values[valuesById[5] = "LINE_ITEM_CHANGE_STATE_ABANDONED"] = 5; + values[valuesById[6] = "LINE_ITEM_CHANGE_STATE_ACTIVATING"] = 6; + return values; + })(); + + /** + * LineItemChangeStateReasonType enum. + * @name google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType + * @enum {number} + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED value + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED=1 LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED value + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED=2 LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED value + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED=3 LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED value + */ + v1.LineItemChangeStateReasonType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED"] = 1; + values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED"] = 2; + values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED"] = 3; + return values; + })(); + + v1.Order = (function() { /** - * Properties of a ListOrdersRequest. + * Properties of an Order. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IListOrdersRequest - * @property {string|null} [parent] ListOrdersRequest parent - * @property {number|null} [pageSize] ListOrdersRequest pageSize - * @property {string|null} [pageToken] ListOrdersRequest pageToken - * @property {string|null} [filter] ListOrdersRequest filter + * @interface IOrder + * @property {string|null} [name] Order name + * @property {string|null} [displayName] Order displayName + * @property {Array.|null} [lineItems] Order lineItems + * @property {Array.|null} [cancelledLineItems] Order cancelledLineItems + * @property {google.protobuf.ITimestamp|null} [createTime] Order createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Order updateTime + * @property {string|null} [etag] Order etag */ /** - * Constructs a new ListOrdersRequest. + * Constructs a new Order. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a ListOrdersRequest. - * @implements IListOrdersRequest + * @classdesc Represents an Order. + * @implements IOrder * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IOrder=} [properties] Properties to set */ - function ListOrdersRequest(properties) { + function Order(properties) { + this.lineItems = []; + this.cancelledLineItems = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3283,117 +3336,165 @@ } /** - * ListOrdersRequest parent. - * @member {string} parent - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * Order name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @instance */ - ListOrdersRequest.prototype.parent = ""; + Order.prototype.name = ""; /** - * ListOrdersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * Order displayName. + * @member {string} displayName + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @instance */ - ListOrdersRequest.prototype.pageSize = 0; + Order.prototype.displayName = ""; /** - * ListOrdersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * Order lineItems. + * @member {Array.} lineItems + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @instance */ - ListOrdersRequest.prototype.pageToken = ""; + Order.prototype.lineItems = $util.emptyArray; /** - * ListOrdersRequest filter. - * @member {string} filter - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * Order cancelledLineItems. + * @member {Array.} cancelledLineItems + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @instance */ - ListOrdersRequest.prototype.filter = ""; + Order.prototype.cancelledLineItems = $util.emptyArray; /** - * Creates a new ListOrdersRequest instance using the specified properties. + * Order createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @instance + */ + Order.prototype.createTime = null; + + /** + * Order updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @instance + */ + Order.prototype.updateTime = null; + + /** + * Order etag. + * @member {string} etag + * @memberof google.cloud.commerce.consumer.procurement.v1.Order + * @instance + */ + Order.prototype.etag = ""; + + /** + * Creates a new Order instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest instance + * @param {google.cloud.commerce.consumer.procurement.v1.IOrder=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order instance */ - ListOrdersRequest.create = function create(properties) { - return new ListOrdersRequest(properties); + Order.create = function create(properties) { + return new Order(properties); }; /** - * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IOrder} message Order message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOrdersRequest.encode = function encode(message, writer) { + Order.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.lineItems != null && message.lineItems.length) + for (var i = 0; i < message.lineItems.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.LineItem.encode(message.lineItems[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.cancelledLineItems != null && message.cancelledLineItems.length) + for (var i = 0; i < message.cancelledLineItems.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.LineItem.encode(message.cancelledLineItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.displayName); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); return writer; }; /** - * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Order.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IOrder} message Order message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOrdersRequest.encodeDelimited = function encodeDelimited(message, writer) { + Order.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer. + * Decodes an Order message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOrdersRequest.decode = function decode(reader, length) { + Order.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Order(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.name = reader.string(); break; } - case 2: { - message.pageSize = reader.int32(); + case 10: { + message.displayName = reader.string(); break; } - case 3: { - message.pageToken = reader.string(); + case 6: { + if (!(message.lineItems && message.lineItems.length)) + message.lineItems = []; + message.lineItems.push($root.google.cloud.commerce.consumer.procurement.v1.LineItem.decode(reader, reader.uint32())); break; } - case 4: { - message.filter = reader.string(); + case 7: { + if (!(message.cancelledLineItems && message.cancelledLineItems.length)) + message.cancelledLineItems = []; + message.cancelledLineItems.push($root.google.cloud.commerce.consumer.procurement.v1.LineItem.decode(reader, reader.uint32())); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); break; } default: @@ -3405,149 +3506,221 @@ }; /** - * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * Decodes an Order message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOrdersRequest.decodeDelimited = function decodeDelimited(reader) { + Order.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOrdersRequest message. + * Verifies an Order message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOrdersRequest.verify = function verify(message) { + Order.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.lineItems != null && message.hasOwnProperty("lineItems")) { + if (!Array.isArray(message.lineItems)) + return "lineItems: array expected"; + for (var i = 0; i < message.lineItems.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.verify(message.lineItems[i]); + if (error) + return "lineItems." + error; + } + } + if (message.cancelledLineItems != null && message.hasOwnProperty("cancelledLineItems")) { + if (!Array.isArray(message.cancelledLineItems)) + return "cancelledLineItems: array expected"; + for (var i = 0; i < message.cancelledLineItems.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.verify(message.cancelledLineItems[i]); + if (error) + return "cancelledLineItems." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; return null; }; /** - * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * Creates an Order message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.Order} Order */ - ListOrdersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest) + Order.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Order) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.Order(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.lineItems) { + if (!Array.isArray(object.lineItems)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.lineItems: array expected"); + message.lineItems = []; + for (var i = 0; i < object.lineItems.length; ++i) { + if (typeof object.lineItems[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.lineItems: object expected"); + message.lineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.fromObject(object.lineItems[i]); + } + } + if (object.cancelledLineItems) { + if (!Array.isArray(object.cancelledLineItems)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.cancelledLineItems: array expected"); + message.cancelledLineItems = []; + for (var i = 0; i < object.cancelledLineItems.length; ++i) { + if (typeof object.cancelledLineItems[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.cancelledLineItems: object expected"); + message.cancelledLineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.fromObject(object.cancelledLineItems[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Order.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); return message; }; /** - * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. + * Creates a plain object from an Order message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} message ListOrdersRequest + * @param {google.cloud.commerce.consumer.procurement.v1.Order} message Order * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOrdersRequest.toObject = function toObject(message, options) { + Order.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) { + object.lineItems = []; + object.cancelledLineItems = []; + } if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.etag = ""; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lineItems && message.lineItems.length) { + object.lineItems = []; + for (var j = 0; j < message.lineItems.length; ++j) + object.lineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.toObject(message.lineItems[j], options); + } + if (message.cancelledLineItems && message.cancelledLineItems.length) { + object.cancelledLineItems = []; + for (var j = 0; j < message.cancelledLineItems.length; ++j) + object.cancelledLineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItem.toObject(message.cancelledLineItems[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; return object; }; /** - * Converts this ListOrdersRequest to JSON. + * Converts this Order to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @instance * @returns {Object.} JSON object */ - ListOrdersRequest.prototype.toJSON = function toJSON() { + Order.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOrdersRequest + * Gets the default type url for Order * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.Order * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOrdersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Order"; }; - return ListOrdersRequest; + return Order; })(); - v1.ListOrdersResponse = (function() { + v1.LineItem = (function() { /** - * Properties of a ListOrdersResponse. + * Properties of a LineItem. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @interface IListOrdersResponse - * @property {Array.|null} [orders] ListOrdersResponse orders - * @property {string|null} [nextPageToken] ListOrdersResponse nextPageToken + * @interface ILineItem + * @property {string|null} [lineItemId] LineItem lineItemId + * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [lineItemInfo] LineItem lineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null} [pendingChange] LineItem pendingChange + * @property {Array.|null} [changeHistory] LineItem changeHistory */ /** - * Constructs a new ListOrdersResponse. + * Constructs a new LineItem. * @memberof google.cloud.commerce.consumer.procurement.v1 - * @classdesc Represents a ListOrdersResponse. - * @implements IListOrdersResponse + * @classdesc Represents a LineItem. + * @implements ILineItem * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem=} [properties] Properties to set */ - function ListOrdersResponse(properties) { - this.orders = []; + function LineItem(properties) { + this.changeHistory = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -3555,92 +3728,120 @@ } /** - * ListOrdersResponse orders. - * @member {Array.} orders - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * LineItem lineItemId. + * @member {string} lineItemId + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @instance */ - ListOrdersResponse.prototype.orders = $util.emptyArray; + LineItem.prototype.lineItemId = ""; /** - * ListOrdersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * LineItem lineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} lineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @instance */ - ListOrdersResponse.prototype.nextPageToken = ""; + LineItem.prototype.lineItemInfo = null; /** - * Creates a new ListOrdersResponse instance using the specified properties. + * LineItem pendingChange. + * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemChange|null|undefined} pendingChange + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @instance + */ + LineItem.prototype.pendingChange = null; + + /** + * LineItem changeHistory. + * @member {Array.} changeHistory + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem + * @instance + */ + LineItem.prototype.changeHistory = $util.emptyArray; + + /** + * Creates a new LineItem instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse instance + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem instance */ - ListOrdersResponse.create = function create(properties) { - return new ListOrdersResponse(properties); + LineItem.create = function create(properties) { + return new LineItem(properties); }; /** - * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. + * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem} message LineItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOrdersResponse.encode = function encode(message, writer) { + LineItem.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.orders != null && message.orders.length) - for (var i = 0; i < message.orders.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1.Order.encode(message.orders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.lineItemId != null && Object.hasOwnProperty.call(message, "lineItemId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lineItemId); + if (message.lineItemInfo != null && Object.hasOwnProperty.call(message, "lineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.lineItemInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pendingChange != null && Object.hasOwnProperty.call(message, "pendingChange")) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.encode(message.pendingChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.changeHistory != null && message.changeHistory.length) + for (var i = 0; i < message.changeHistory.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.encode(message.changeHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. + * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItem.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static - * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItem} message LineItem message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListOrdersResponse.encodeDelimited = function encodeDelimited(message, writer) { + LineItem.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListOrdersResponse message from the specified reader or buffer. + * Decodes a LineItem message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOrdersResponse.decode = function decode(reader, length) { + LineItem.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItem(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.orders && message.orders.length)) - message.orders = []; - message.orders.push($root.google.cloud.commerce.consumer.procurement.v1.Order.decode(reader, reader.uint32())); + message.lineItemId = reader.string(); break; } case 2: { - message.nextPageToken = reader.string(); + message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.changeHistory && message.changeHistory.length)) + message.changeHistory = []; + message.changeHistory.push($root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.decode(reader, reader.uint32())); break; } default: @@ -3652,384 +3853,378 @@ }; /** - * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * Decodes a LineItem message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListOrdersResponse.decodeDelimited = function decodeDelimited(reader) { + LineItem.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListOrdersResponse message. + * Verifies a LineItem message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListOrdersResponse.verify = function verify(message) { + LineItem.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.orders != null && message.hasOwnProperty("orders")) { - if (!Array.isArray(message.orders)) - return "orders: array expected"; - for (var i = 0; i < message.orders.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1.Order.verify(message.orders[i]); + if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) + if (!$util.isString(message.lineItemId)) + return "lineItemId: string expected"; + if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.lineItemInfo); + if (error) + return "lineItemInfo." + error; + } + if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify(message.pendingChange); + if (error) + return "pendingChange." + error; + } + if (message.changeHistory != null && message.hasOwnProperty("changeHistory")) { + if (!Array.isArray(message.changeHistory)) + return "changeHistory: array expected"; + for (var i = 0; i < message.changeHistory.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify(message.changeHistory[i]); if (error) - return "orders." + error; + return "changeHistory." + error; } } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; return null; }; /** - * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a LineItem message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItem} LineItem */ - ListOrdersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse) + LineItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LineItem) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse(); - if (object.orders) { - if (!Array.isArray(object.orders)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.orders: array expected"); - message.orders = []; - for (var i = 0; i < object.orders.length; ++i) { - if (typeof object.orders[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.orders: object expected"); - message.orders[i] = $root.google.cloud.commerce.consumer.procurement.v1.Order.fromObject(object.orders[i]); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItem(); + if (object.lineItemId != null) + message.lineItemId = String(object.lineItemId); + if (object.lineItemInfo != null) { + if (typeof object.lineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.lineItemInfo: object expected"); + message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.lineItemInfo); + } + if (object.pendingChange != null) { + if (typeof object.pendingChange !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.pendingChange: object expected"); + message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.fromObject(object.pendingChange); + } + if (object.changeHistory) { + if (!Array.isArray(object.changeHistory)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.changeHistory: array expected"); + message.changeHistory = []; + for (var i = 0; i < object.changeHistory.length; ++i) { + if (typeof object.changeHistory[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItem.changeHistory: object expected"); + message.changeHistory[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.fromObject(object.changeHistory[i]); } } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. + * Creates a plain object from a LineItem message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static - * @param {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} message ListOrdersResponse + * @param {google.cloud.commerce.consumer.procurement.v1.LineItem} message LineItem * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListOrdersResponse.toObject = function toObject(message, options) { + LineItem.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.orders = []; - if (options.defaults) - object.nextPageToken = ""; - if (message.orders && message.orders.length) { - object.orders = []; - for (var j = 0; j < message.orders.length; ++j) - object.orders[j] = $root.google.cloud.commerce.consumer.procurement.v1.Order.toObject(message.orders[j], options); + object.changeHistory = []; + if (options.defaults) { + object.lineItemId = ""; + object.lineItemInfo = null; + object.pendingChange = null; + } + if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) + object.lineItemId = message.lineItemId; + if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) + object.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.lineItemInfo, options); + if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) + object.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.toObject(message.pendingChange, options); + if (message.changeHistory && message.changeHistory.length) { + object.changeHistory = []; + for (var j = 0; j < message.changeHistory.length; ++j) + object.changeHistory[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange.toObject(message.changeHistory[j], options); } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this ListOrdersResponse to JSON. + * Converts this LineItem to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @instance * @returns {Object.} JSON object */ - ListOrdersResponse.prototype.toJSON = function toJSON() { + LineItem.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListOrdersResponse + * Gets the default type url for LineItem * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItem * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListOrdersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LineItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LineItem"; }; - return ListOrdersResponse; + return LineItem; })(); - return v1; - })(); + v1.LineItemChange = (function() { - procurement.v1alpha1 = (function() { + /** + * Properties of a LineItemChange. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface ILineItemChange + * @property {string|null} [changeId] LineItemChange changeId + * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|null} [changeType] LineItemChange changeType + * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [oldLineItemInfo] LineItemChange oldLineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [newLineItemInfo] LineItemChange newLineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeState|null} [changeState] LineItemChange changeState + * @property {string|null} [stateReason] LineItemChange stateReason + * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType|null} [changeStateReasonType] LineItemChange changeStateReasonType + * @property {google.protobuf.ITimestamp|null} [changeEffectiveTime] LineItemChange changeEffectiveTime + * @property {google.protobuf.ITimestamp|null} [createTime] LineItemChange createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LineItemChange updateTime + */ - /** - * Namespace v1alpha1. - * @memberof google.cloud.commerce.consumer.procurement - * @namespace - */ - var v1alpha1 = {}; + /** + * Constructs a new LineItemChange. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a LineItemChange. + * @implements ILineItemChange + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange=} [properties] Properties to set + */ + function LineItemChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * LineItemChangeType enum. - * @name google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType - * @enum {number} - * @property {number} LINE_ITEM_CHANGE_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_TYPE_UNSPECIFIED value - * @property {number} LINE_ITEM_CHANGE_TYPE_CREATE=1 LINE_ITEM_CHANGE_TYPE_CREATE value - * @property {number} LINE_ITEM_CHANGE_TYPE_UPDATE=2 LINE_ITEM_CHANGE_TYPE_UPDATE value - * @property {number} LINE_ITEM_CHANGE_TYPE_CANCEL=3 LINE_ITEM_CHANGE_TYPE_CANCEL value - * @property {number} LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION=4 LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION value - */ - v1alpha1.LineItemChangeType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM_CHANGE_TYPE_CREATE"] = 1; - values[valuesById[2] = "LINE_ITEM_CHANGE_TYPE_UPDATE"] = 2; - values[valuesById[3] = "LINE_ITEM_CHANGE_TYPE_CANCEL"] = 3; - values[valuesById[4] = "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION"] = 4; - return values; - })(); - - /** - * LineItemChangeState enum. - * @name google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState - * @enum {number} - * @property {number} LINE_ITEM_CHANGE_STATE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_UNSPECIFIED value - * @property {number} LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL=1 LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL value - * @property {number} LINE_ITEM_CHANGE_STATE_APPROVED=2 LINE_ITEM_CHANGE_STATE_APPROVED value - * @property {number} LINE_ITEM_CHANGE_STATE_COMPLETED=3 LINE_ITEM_CHANGE_STATE_COMPLETED value - * @property {number} LINE_ITEM_CHANGE_STATE_REJECTED=4 LINE_ITEM_CHANGE_STATE_REJECTED value - * @property {number} LINE_ITEM_CHANGE_STATE_ABANDONED=5 LINE_ITEM_CHANGE_STATE_ABANDONED value - * @property {number} LINE_ITEM_CHANGE_STATE_ACTIVATING=6 LINE_ITEM_CHANGE_STATE_ACTIVATING value - */ - v1alpha1.LineItemChangeState = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL"] = 1; - values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_APPROVED"] = 2; - values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_COMPLETED"] = 3; - values[valuesById[4] = "LINE_ITEM_CHANGE_STATE_REJECTED"] = 4; - values[valuesById[5] = "LINE_ITEM_CHANGE_STATE_ABANDONED"] = 5; - values[valuesById[6] = "LINE_ITEM_CHANGE_STATE_ACTIVATING"] = 6; - return values; - })(); - - /** - * LineItemChangeStateReasonType enum. - * @name google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType - * @enum {number} - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED value - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED=1 LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED value - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED=2 LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED value - * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED=3 LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED value - */ - v1alpha1.LineItemChangeStateReasonType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED"] = 1; - values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED"] = 2; - values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED"] = 3; - return values; - })(); - - v1alpha1.Order = (function() { + /** + * LineItemChange changeId. + * @member {string} changeId + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @instance + */ + LineItemChange.prototype.changeId = ""; /** - * Properties of an Order. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface IOrder - * @property {string|null} [name] Order name - * @property {string|null} [displayName] Order displayName - * @property {Array.|null} [lineItems] Order lineItems - * @property {Array.|null} [cancelledLineItems] Order cancelledLineItems - * @property {google.protobuf.ITimestamp|null} [createTime] Order createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] Order updateTime - * @property {string|null} [etag] Order etag + * LineItemChange changeType. + * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeType} changeType + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @instance */ + LineItemChange.prototype.changeType = 0; /** - * Constructs a new Order. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents an Order. - * @implements IOrder - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder=} [properties] Properties to set + * LineItemChange oldLineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} oldLineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange + * @instance */ - function Order(properties) { - this.lineItems = []; - this.cancelledLineItems = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + LineItemChange.prototype.oldLineItemInfo = null; /** - * Order name. - * @member {string} name - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange newLineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} newLineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.name = ""; + LineItemChange.prototype.newLineItemInfo = null; /** - * Order displayName. - * @member {string} displayName - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange changeState. + * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeState} changeState + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.displayName = ""; + LineItemChange.prototype.changeState = 0; /** - * Order lineItems. - * @member {Array.} lineItems - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange stateReason. + * @member {string} stateReason + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.lineItems = $util.emptyArray; + LineItemChange.prototype.stateReason = ""; /** - * Order cancelledLineItems. - * @member {Array.} cancelledLineItems - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange changeStateReasonType. + * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType} changeStateReasonType + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.cancelledLineItems = $util.emptyArray; + LineItemChange.prototype.changeStateReasonType = 0; /** - * Order createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange changeEffectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} changeEffectiveTime + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.createTime = null; + LineItemChange.prototype.changeEffectiveTime = null; /** - * Order updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.updateTime = null; + LineItemChange.prototype.createTime = null; /** - * Order etag. - * @member {string} etag - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * LineItemChange updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance */ - Order.prototype.etag = ""; + LineItemChange.prototype.updateTime = null; /** - * Creates a new Order instance using the specified properties. + * Creates a new LineItemChange instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order instance + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange instance */ - Order.create = function create(properties) { - return new Order(properties); + LineItemChange.create = function create(properties) { + return new LineItemChange(properties); }; /** - * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder} message Order message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange} message LineItemChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Order.encode = function encode(message, writer) { + LineItemChange.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - if (message.lineItems != null && message.lineItems.length) - for (var i = 0; i < message.lineItems.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.encode(message.lineItems[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); - if (message.cancelledLineItems != null && message.cancelledLineItems.length) - for (var i = 0; i < message.cancelledLineItems.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.encode(message.cancelledLineItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.changeId != null && Object.hasOwnProperty.call(message, "changeId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.changeId); + if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.changeType); + if (message.oldLineItemInfo != null && Object.hasOwnProperty.call(message, "oldLineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.oldLineItemInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.newLineItemInfo != null && Object.hasOwnProperty.call(message, "newLineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.newLineItemInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.changeState != null && Object.hasOwnProperty.call(message, "changeState")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeState); + if (message.stateReason != null && Object.hasOwnProperty.call(message, "stateReason")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.stateReason); + if (message.changeEffectiveTime != null && Object.hasOwnProperty.call(message, "changeEffectiveTime")) + $root.google.protobuf.Timestamp.encode(message.changeEffectiveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 10, wireType 2 =*/82).string(message.displayName); - if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) - writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + if (message.changeStateReasonType != null && Object.hasOwnProperty.call(message, "changeStateReasonType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.changeStateReasonType); return writer; }; /** - * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemChange.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder} message Order message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemChange} message LineItemChange message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Order.encodeDelimited = function encodeDelimited(message, writer) { + LineItemChange.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an Order message from the specified reader or buffer. + * Decodes a LineItemChange message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.decode = function decode(reader, length) { + LineItemChange.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.changeId = reader.string(); break; } - case 10: { - message.displayName = reader.string(); + case 2: { + message.changeType = reader.int32(); + break; + } + case 3: { + message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.changeState = reader.int32(); break; } case 6: { - if (!(message.lineItems && message.lineItems.length)) - message.lineItems = []; - message.lineItems.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.decode(reader, reader.uint32())); + message.stateReason = reader.string(); + break; + } + case 10: { + message.changeStateReasonType = reader.int32(); break; } case 7: { - if (!(message.cancelledLineItems && message.cancelledLineItems.length)) - message.cancelledLineItems = []; - message.cancelledLineItems.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.decode(reader, reader.uint32())); + message.changeEffectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 8: { @@ -4040,10 +4235,6 @@ message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } - case 11: { - message.etag = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -4053,55 +4244,86 @@ }; /** - * Decodes an Order message from the specified reader or buffer, length delimited. + * Decodes a LineItemChange message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Order.decodeDelimited = function decodeDelimited(reader) { + LineItemChange.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an Order message. + * Verifies a LineItemChange message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Order.verify = function verify(message) { + LineItemChange.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - if (message.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.lineItems != null && message.hasOwnProperty("lineItems")) { - if (!Array.isArray(message.lineItems)) - return "lineItems: array expected"; - for (var i = 0; i < message.lineItems.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify(message.lineItems[i]); - if (error) - return "lineItems." + error; - } - } - if (message.cancelledLineItems != null && message.hasOwnProperty("cancelledLineItems")) { - if (!Array.isArray(message.cancelledLineItems)) - return "cancelledLineItems: array expected"; - for (var i = 0; i < message.cancelledLineItems.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify(message.cancelledLineItems[i]); - if (error) - return "cancelledLineItems." + error; + if (message.changeId != null && message.hasOwnProperty("changeId")) + if (!$util.isString(message.changeId)) + return "changeId: string expected"; + if (message.changeType != null && message.hasOwnProperty("changeType")) + switch (message.changeType) { + default: + return "changeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.oldLineItemInfo); + if (error) + return "oldLineItemInfo." + error; + } + if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.newLineItemInfo); + if (error) + return "newLineItemInfo." + error; + } + if (message.changeState != null && message.hasOwnProperty("changeState")) + switch (message.changeState) { + default: + return "changeState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.stateReason != null && message.hasOwnProperty("stateReason")) + if (!$util.isString(message.stateReason)) + return "stateReason: string expected"; + if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) + switch (message.changeStateReasonType) { + default: + return "changeStateReasonType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; } + if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.changeEffectiveTime); + if (error) + return "changeEffectiveTime." + error; } if (message.createTime != null && message.hasOwnProperty("createTime")) { var error = $root.google.protobuf.Timestamp.verify(message.createTime); @@ -4113,161 +4335,239 @@ if (error) return "updateTime." + error; } - if (message.etag != null && message.hasOwnProperty("etag")) - if (!$util.isString(message.etag)) - return "etag: string expected"; return null; }; /** - * Creates an Order message from a plain object. Also converts values to their respective internal types. + * Creates a LineItemChange message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemChange} LineItemChange */ - Order.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order) + LineItemChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order(); - if (object.name != null) - message.name = String(object.name); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.lineItems) { - if (!Array.isArray(object.lineItems)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.lineItems: array expected"); - message.lineItems = []; - for (var i = 0; i < object.lineItems.length; ++i) { - if (typeof object.lineItems[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.lineItems: object expected"); - message.lineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.fromObject(object.lineItems[i]); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemChange(); + if (object.changeId != null) + message.changeId = String(object.changeId); + switch (object.changeType) { + default: + if (typeof object.changeType === "number") { + message.changeType = object.changeType; + break; } + break; + case "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "LINE_ITEM_CHANGE_TYPE_CREATE": + case 1: + message.changeType = 1; + break; + case "LINE_ITEM_CHANGE_TYPE_UPDATE": + case 2: + message.changeType = 2; + break; + case "LINE_ITEM_CHANGE_TYPE_CANCEL": + case 3: + message.changeType = 3; + break; + case "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION": + case 4: + message.changeType = 4; + break; } - if (object.cancelledLineItems) { - if (!Array.isArray(object.cancelledLineItems)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.cancelledLineItems: array expected"); - message.cancelledLineItems = []; - for (var i = 0; i < object.cancelledLineItems.length; ++i) { - if (typeof object.cancelledLineItems[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.cancelledLineItems: object expected"); - message.cancelledLineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.fromObject(object.cancelledLineItems[i]); + if (object.oldLineItemInfo != null) { + if (typeof object.oldLineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.oldLineItemInfo: object expected"); + message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.oldLineItemInfo); + } + if (object.newLineItemInfo != null) { + if (typeof object.newLineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.newLineItemInfo: object expected"); + message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.newLineItemInfo); + } + switch (object.changeState) { + default: + if (typeof object.changeState === "number") { + message.changeState = object.changeState; + break; + } + break; + case "LINE_ITEM_CHANGE_STATE_UNSPECIFIED": + case 0: + message.changeState = 0; + break; + case "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL": + case 1: + message.changeState = 1; + break; + case "LINE_ITEM_CHANGE_STATE_APPROVED": + case 2: + message.changeState = 2; + break; + case "LINE_ITEM_CHANGE_STATE_COMPLETED": + case 3: + message.changeState = 3; + break; + case "LINE_ITEM_CHANGE_STATE_REJECTED": + case 4: + message.changeState = 4; + break; + case "LINE_ITEM_CHANGE_STATE_ABANDONED": + case 5: + message.changeState = 5; + break; + case "LINE_ITEM_CHANGE_STATE_ACTIVATING": + case 6: + message.changeState = 6; + break; + } + if (object.stateReason != null) + message.stateReason = String(object.stateReason); + switch (object.changeStateReasonType) { + default: + if (typeof object.changeStateReasonType === "number") { + message.changeStateReasonType = object.changeStateReasonType; + break; } + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED": + case 0: + message.changeStateReasonType = 0; + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED": + case 1: + message.changeStateReasonType = 1; + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED": + case 2: + message.changeStateReasonType = 2; + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED": + case 3: + message.changeStateReasonType = 3; + break; + } + if (object.changeEffectiveTime != null) { + if (typeof object.changeEffectiveTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.changeEffectiveTime: object expected"); + message.changeEffectiveTime = $root.google.protobuf.Timestamp.fromObject(object.changeEffectiveTime); } if (object.createTime != null) { if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.createTime: object expected"); + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.createTime: object expected"); message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } if (object.updateTime != null) { if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.updateTime: object expected"); + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemChange.updateTime: object expected"); message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); } - if (object.etag != null) - message.etag = String(object.etag); return message; }; /** - * Creates a plain object from an Order message. Also converts values to other types if specified. + * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Order} message Order + * @param {google.cloud.commerce.consumer.procurement.v1.LineItemChange} message LineItemChange * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Order.toObject = function toObject(message, options) { + LineItemChange.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) { - object.lineItems = []; - object.cancelledLineItems = []; - } if (options.defaults) { - object.name = ""; + object.changeId = ""; + object.changeType = options.enums === String ? "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED" : 0; + object.oldLineItemInfo = null; + object.newLineItemInfo = null; + object.changeState = options.enums === String ? "LINE_ITEM_CHANGE_STATE_UNSPECIFIED" : 0; + object.stateReason = ""; + object.changeEffectiveTime = null; object.createTime = null; object.updateTime = null; - object.displayName = ""; - object.etag = ""; - } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.lineItems && message.lineItems.length) { - object.lineItems = []; - for (var j = 0; j < message.lineItems.length; ++j) - object.lineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.toObject(message.lineItems[j], options); - } - if (message.cancelledLineItems && message.cancelledLineItems.length) { - object.cancelledLineItems = []; - for (var j = 0; j < message.cancelledLineItems.length; ++j) - object.cancelledLineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.toObject(message.cancelledLineItems[j], options); + object.changeStateReasonType = options.enums === String ? "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED" : 0; } + if (message.changeId != null && message.hasOwnProperty("changeId")) + object.changeId = message.changeId; + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeType[message.changeType] === undefined ? message.changeType : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeType[message.changeType] : message.changeType; + if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) + object.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.oldLineItemInfo, options); + if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) + object.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.newLineItemInfo, options); + if (message.changeState != null && message.hasOwnProperty("changeState")) + object.changeState = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeState[message.changeState] === undefined ? message.changeState : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeState[message.changeState] : message.changeState; + if (message.stateReason != null && message.hasOwnProperty("stateReason")) + object.stateReason = message.stateReason; + if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) + object.changeEffectiveTime = $root.google.protobuf.Timestamp.toObject(message.changeEffectiveTime, options); if (message.createTime != null && message.hasOwnProperty("createTime")) object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); if (message.updateTime != null && message.hasOwnProperty("updateTime")) object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.etag != null && message.hasOwnProperty("etag")) - object.etag = message.etag; + if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) + object.changeStateReasonType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType[message.changeStateReasonType] === undefined ? message.changeStateReasonType : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeStateReasonType[message.changeStateReasonType] : message.changeStateReasonType; return object; }; /** - * Converts this Order to JSON. + * Converts this LineItemChange to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @instance * @returns {Object.} JSON object */ - Order.prototype.toJSON = function toJSON() { + LineItemChange.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Order + * Gets the default type url for LineItemChange * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemChange * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LineItemChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Order"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LineItemChange"; }; - return Order; + return LineItemChange; })(); - v1alpha1.LineItem = (function() { + v1.LineItemInfo = (function() { /** - * Properties of a LineItem. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface ILineItem - * @property {string|null} [lineItemId] LineItem lineItemId - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null} [lineItemInfo] LineItem lineItemInfo - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null} [pendingChange] LineItem pendingChange - * @property {Array.|null} [changeHistory] LineItem changeHistory + * Properties of a LineItemInfo. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface ILineItemInfo + * @property {string|null} [offer] LineItemInfo offer + * @property {Array.|null} [parameters] LineItemInfo parameters + * @property {google.cloud.commerce.consumer.procurement.v1.ISubscription|null} [subscription] LineItemInfo subscription */ /** - * Constructs a new LineItem. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a LineItem. - * @implements ILineItem + * Constructs a new LineItemInfo. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a LineItemInfo. + * @implements ILineItemInfo * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo=} [properties] Properties to set */ - function LineItem(properties) { - this.changeHistory = []; + function LineItemInfo(properties) { + this.parameters = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4275,120 +4575,106 @@ } /** - * LineItem lineItemId. - * @member {string} lineItemId - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem - * @instance - */ - LineItem.prototype.lineItemId = ""; - - /** - * LineItem lineItemInfo. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null|undefined} lineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * LineItemInfo offer. + * @member {string} offer + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @instance */ - LineItem.prototype.lineItemInfo = null; + LineItemInfo.prototype.offer = ""; /** - * LineItem pendingChange. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null|undefined} pendingChange - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * LineItemInfo parameters. + * @member {Array.} parameters + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @instance */ - LineItem.prototype.pendingChange = null; + LineItemInfo.prototype.parameters = $util.emptyArray; /** - * LineItem changeHistory. - * @member {Array.} changeHistory - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * LineItemInfo subscription. + * @member {google.cloud.commerce.consumer.procurement.v1.ISubscription|null|undefined} subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @instance */ - LineItem.prototype.changeHistory = $util.emptyArray; + LineItemInfo.prototype.subscription = null; /** - * Creates a new LineItem instance using the specified properties. + * Creates a new LineItemInfo instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem instance + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo instance */ - LineItem.create = function create(properties) { - return new LineItem(properties); + LineItemInfo.create = function create(properties) { + return new LineItemInfo(properties); }; /** - * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem} message LineItem message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo} message LineItemInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItem.encode = function encode(message, writer) { + LineItemInfo.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.lineItemId != null && Object.hasOwnProperty.call(message, "lineItemId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.lineItemId); - if (message.lineItemInfo != null && Object.hasOwnProperty.call(message, "lineItemInfo")) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.lineItemInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.pendingChange != null && Object.hasOwnProperty.call(message, "pendingChange")) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.encode(message.pendingChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.changeHistory != null && message.changeHistory.length) - for (var i = 0; i < message.changeHistory.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.encode(message.changeHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.Parameter.encode(message.parameters[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) + $root.google.cloud.commerce.consumer.procurement.v1.Subscription.encode(message.subscription, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.offer != null && Object.hasOwnProperty.call(message, "offer")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.offer); return writer; }; /** - * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem} message LineItem message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo} message LineItemInfo message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItem.encodeDelimited = function encodeDelimited(message, writer) { + LineItemInfo.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LineItem message from the specified reader or buffer. + * Decodes a LineItemInfo message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItem.decode = function decode(reader, length) { + LineItemInfo.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.lineItemId = reader.string(); - break; - } - case 2: { - message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32()); + case 13: { + message.offer = reader.string(); break; } - case 3: { - message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.decode(reader, reader.uint32()); + case 9: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.commerce.consumer.procurement.v1.Parameter.decode(reader, reader.uint32())); break; } - case 4: { - if (!(message.changeHistory && message.changeHistory.length)) - message.changeHistory = []; - message.changeHistory.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.decode(reader, reader.uint32())); + case 10: { + message.subscription = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.decode(reader, reader.uint32()); break; } default: @@ -4400,184 +4686,163 @@ }; /** - * Decodes a LineItem message from the specified reader or buffer, length delimited. + * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItem.decodeDelimited = function decodeDelimited(reader) { + LineItemInfo.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LineItem message. + * Verifies a LineItemInfo message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LineItem.verify = function verify(message) { + LineItemInfo.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) - if (!$util.isString(message.lineItemId)) - return "lineItemId: string expected"; - if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.lineItemInfo); - if (error) - return "lineItemInfo." + error; - } - if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify(message.pendingChange); - if (error) - return "pendingChange." + error; - } - if (message.changeHistory != null && message.hasOwnProperty("changeHistory")) { - if (!Array.isArray(message.changeHistory)) - return "changeHistory: array expected"; - for (var i = 0; i < message.changeHistory.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify(message.changeHistory[i]); + if (message.offer != null && message.hasOwnProperty("offer")) + if (!$util.isString(message.offer)) + return "offer: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.verify(message.parameters[i]); if (error) - return "changeHistory." + error; + return "parameters." + error; } } + if (message.subscription != null && message.hasOwnProperty("subscription")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.verify(message.subscription); + if (error) + return "subscription." + error; + } return null; }; /** - * Creates a LineItem message from a plain object. Also converts values to their respective internal types. + * Creates a LineItemInfo message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem + * @returns {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} LineItemInfo */ - LineItem.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem) + LineItemInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem(); - if (object.lineItemId != null) - message.lineItemId = String(object.lineItemId); - if (object.lineItemInfo != null) { - if (typeof object.lineItemInfo !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.lineItemInfo: object expected"); - message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.lineItemInfo); - } - if (object.pendingChange != null) { - if (typeof object.pendingChange !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.pendingChange: object expected"); - message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.fromObject(object.pendingChange); - } - if (object.changeHistory) { - if (!Array.isArray(object.changeHistory)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.changeHistory: array expected"); - message.changeHistory = []; - for (var i = 0; i < object.changeHistory.length; ++i) { - if (typeof object.changeHistory[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.changeHistory: object expected"); - message.changeHistory[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.fromObject(object.changeHistory[i]); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo(); + if (object.offer != null) + message.offer = String(object.offer); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemInfo.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemInfo.parameters: object expected"); + message.parameters[i] = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.fromObject(object.parameters[i]); } } + if (object.subscription != null) { + if (typeof object.subscription !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.LineItemInfo.subscription: object expected"); + message.subscription = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.fromObject(object.subscription); + } return message; }; /** - * Creates a plain object from a LineItem message. Also converts values to other types if specified. + * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} message LineItem + * @param {google.cloud.commerce.consumer.procurement.v1.LineItemInfo} message LineItemInfo * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LineItem.toObject = function toObject(message, options) { + LineItemInfo.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.changeHistory = []; + object.parameters = []; if (options.defaults) { - object.lineItemId = ""; - object.lineItemInfo = null; - object.pendingChange = null; + object.subscription = null; + object.offer = ""; } - if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) - object.lineItemId = message.lineItemId; - if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) - object.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.lineItemInfo, options); - if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) - object.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.toObject(message.pendingChange, options); - if (message.changeHistory && message.changeHistory.length) { - object.changeHistory = []; - for (var j = 0; j < message.changeHistory.length; ++j) - object.changeHistory[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.toObject(message.changeHistory[j], options); + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.toObject(message.parameters[j], options); } + if (message.subscription != null && message.hasOwnProperty("subscription")) + object.subscription = $root.google.cloud.commerce.consumer.procurement.v1.Subscription.toObject(message.subscription, options); + if (message.offer != null && message.hasOwnProperty("offer")) + object.offer = message.offer; return object; }; /** - * Converts this LineItem to JSON. + * Converts this LineItemInfo to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @instance * @returns {Object.} JSON object */ - LineItem.prototype.toJSON = function toJSON() { + LineItemInfo.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LineItem + * Gets the default type url for LineItemInfo * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @memberof google.cloud.commerce.consumer.procurement.v1.LineItemInfo * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LineItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + LineItemInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.LineItem"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.LineItemInfo"; }; - return LineItem; + return LineItemInfo; })(); - v1alpha1.LineItemChange = (function() { + v1.Parameter = (function() { /** - * Properties of a LineItemChange. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface ILineItemChange - * @property {string|null} [changeId] LineItemChange changeId - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|null} [changeType] LineItemChange changeType - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null} [oldLineItemInfo] LineItemChange oldLineItemInfo - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null} [newLineItemInfo] LineItemChange newLineItemInfo - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|null} [changeState] LineItemChange changeState - * @property {string|null} [stateReason] LineItemChange stateReason - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|null} [changeStateReasonType] LineItemChange changeStateReasonType - * @property {google.protobuf.ITimestamp|null} [changeEffectiveTime] LineItemChange changeEffectiveTime - * @property {google.protobuf.ITimestamp|null} [createTime] LineItemChange createTime - * @property {google.protobuf.ITimestamp|null} [updateTime] LineItemChange updateTime + * Properties of a Parameter. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IParameter + * @property {string|null} [name] Parameter name + * @property {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null} [value] Parameter value */ /** - * Constructs a new LineItemChange. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a LineItemChange. - * @implements ILineItemChange + * Constructs a new Parameter. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a Parameter. + * @implements IParameter * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IParameter=} [properties] Properties to set */ - function LineItemChange(properties) { + function Parameter(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -4585,201 +4850,89 @@ } /** - * LineItemChange changeId. - * @member {string} changeId - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeId = ""; - - /** - * LineItemChange changeType. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType} changeType - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeType = 0; - - /** - * LineItemChange oldLineItemInfo. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null|undefined} oldLineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.oldLineItemInfo = null; - - /** - * LineItemChange newLineItemInfo. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null|undefined} newLineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.newLineItemInfo = null; - - /** - * LineItemChange changeState. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState} changeState - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeState = 0; - - /** - * LineItemChange stateReason. - * @member {string} stateReason - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.stateReason = ""; - - /** - * LineItemChange changeStateReasonType. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType} changeStateReasonType - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeStateReasonType = 0; - - /** - * LineItemChange changeEffectiveTime. - * @member {google.protobuf.ITimestamp|null|undefined} changeEffectiveTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange - * @instance - */ - LineItemChange.prototype.changeEffectiveTime = null; - - /** - * LineItemChange createTime. - * @member {google.protobuf.ITimestamp|null|undefined} createTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * Parameter name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @instance */ - LineItemChange.prototype.createTime = null; + Parameter.prototype.name = ""; /** - * LineItemChange updateTime. - * @member {google.protobuf.ITimestamp|null|undefined} updateTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * Parameter value. + * @member {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue|null|undefined} value + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @instance */ - LineItemChange.prototype.updateTime = null; + Parameter.prototype.value = null; /** - * Creates a new LineItemChange instance using the specified properties. + * Creates a new Parameter instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange instance + * @param {google.cloud.commerce.consumer.procurement.v1.IParameter=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter instance */ - LineItemChange.create = function create(properties) { - return new LineItemChange(properties); + Parameter.create = function create(properties) { + return new Parameter(properties); }; /** - * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange} message LineItemChange message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IParameter} message Parameter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItemChange.encode = function encode(message, writer) { + Parameter.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.changeId != null && Object.hasOwnProperty.call(message, "changeId")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.changeId); - if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.changeType); - if (message.oldLineItemInfo != null && Object.hasOwnProperty.call(message, "oldLineItemInfo")) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.oldLineItemInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); - if (message.newLineItemInfo != null && Object.hasOwnProperty.call(message, "newLineItemInfo")) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.newLineItemInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); - if (message.changeState != null && Object.hasOwnProperty.call(message, "changeState")) - writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeState); - if (message.stateReason != null && Object.hasOwnProperty.call(message, "stateReason")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.stateReason); - if (message.changeEffectiveTime != null && Object.hasOwnProperty.call(message, "changeEffectiveTime")) - $root.google.protobuf.Timestamp.encode(message.changeEffectiveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); - if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) - $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) - $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.changeStateReasonType != null && Object.hasOwnProperty.call(message, "changeStateReasonType")) - writer.uint32(/* id 10, wireType 0 =*/80).int32(message.changeStateReasonType); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && Object.hasOwnProperty.call(message, "value")) + $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange} message LineItemChange message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IParameter} message Parameter message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - LineItemChange.encodeDelimited = function encodeDelimited(message, writer) { + Parameter.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a LineItemChange message from the specified reader or buffer. + * Decodes a Parameter message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItemChange.decode = function decode(reader, length) { + Parameter.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.changeId = reader.string(); + message.name = reader.string(); break; } case 2: { - message.changeType = reader.int32(); - break; - } - case 3: { - message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32()); - break; - } - case 4: { - message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32()); - break; - } - case 5: { - message.changeState = reader.int32(); - break; - } - case 6: { - message.stateReason = reader.string(); - break; - } - case 10: { - message.changeStateReasonType = reader.int32(); - break; - } - case 7: { - message.changeEffectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 8: { - message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); - break; - } - case 9: { - message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + message.value = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.decode(reader, reader.uint32()); break; } default: @@ -4791,695 +4944,531 @@ }; /** - * Decodes a LineItemChange message from the specified reader or buffer, length delimited. + * Decodes a Parameter message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - LineItemChange.decodeDelimited = function decodeDelimited(reader) { + Parameter.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a LineItemChange message. + * Verifies a Parameter message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - LineItemChange.verify = function verify(message) { + Parameter.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.changeId != null && message.hasOwnProperty("changeId")) - if (!$util.isString(message.changeId)) - return "changeId: string expected"; - if (message.changeType != null && message.hasOwnProperty("changeType")) - switch (message.changeType) { - default: - return "changeType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - break; - } - if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.oldLineItemInfo); - if (error) - return "oldLineItemInfo." + error; - } - if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.newLineItemInfo); - if (error) - return "newLineItemInfo." + error; - } - if (message.changeState != null && message.hasOwnProperty("changeState")) - switch (message.changeState) { - default: - return "changeState: enum value expected"; - case 0: - case 1: - case 2: - case 3: - case 4: - case 5: - case 6: - break; - } - if (message.stateReason != null && message.hasOwnProperty("stateReason")) - if (!$util.isString(message.stateReason)) - return "stateReason: string expected"; - if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) - switch (message.changeStateReasonType) { - default: - return "changeStateReasonType: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.changeEffectiveTime); - if (error) - return "changeEffectiveTime." + error; - } - if (message.createTime != null && message.hasOwnProperty("createTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.createTime); - if (error) - return "createTime." + error; - } - if (message.updateTime != null && message.hasOwnProperty("updateTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify(message.value); if (error) - return "updateTime." + error; + return "value." + error; } return null; }; /** - * Creates a LineItemChange message from a plain object. Also converts values to their respective internal types. + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter} Parameter */ - LineItemChange.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange) + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Parameter) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange(); - if (object.changeId != null) - message.changeId = String(object.changeId); - switch (object.changeType) { - default: - if (typeof object.changeType === "number") { - message.changeType = object.changeType; - break; - } - break; - case "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED": - case 0: - message.changeType = 0; - break; - case "LINE_ITEM_CHANGE_TYPE_CREATE": - case 1: - message.changeType = 1; - break; - case "LINE_ITEM_CHANGE_TYPE_UPDATE": - case 2: - message.changeType = 2; - break; - case "LINE_ITEM_CHANGE_TYPE_CANCEL": - case 3: - message.changeType = 3; - break; - case "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION": - case 4: - message.changeType = 4; - break; - } - if (object.oldLineItemInfo != null) { - if (typeof object.oldLineItemInfo !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.oldLineItemInfo: object expected"); - message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.oldLineItemInfo); - } - if (object.newLineItemInfo != null) { - if (typeof object.newLineItemInfo !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.newLineItemInfo: object expected"); - message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.newLineItemInfo); - } - switch (object.changeState) { - default: - if (typeof object.changeState === "number") { - message.changeState = object.changeState; - break; - } - break; - case "LINE_ITEM_CHANGE_STATE_UNSPECIFIED": - case 0: - message.changeState = 0; - break; - case "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL": - case 1: - message.changeState = 1; - break; - case "LINE_ITEM_CHANGE_STATE_APPROVED": - case 2: - message.changeState = 2; - break; - case "LINE_ITEM_CHANGE_STATE_COMPLETED": - case 3: - message.changeState = 3; - break; - case "LINE_ITEM_CHANGE_STATE_REJECTED": - case 4: - message.changeState = 4; - break; - case "LINE_ITEM_CHANGE_STATE_ABANDONED": - case 5: - message.changeState = 5; - break; - case "LINE_ITEM_CHANGE_STATE_ACTIVATING": - case 6: - message.changeState = 6; - break; - } - if (object.stateReason != null) - message.stateReason = String(object.stateReason); - switch (object.changeStateReasonType) { - default: - if (typeof object.changeStateReasonType === "number") { - message.changeStateReasonType = object.changeStateReasonType; - break; - } - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED": - case 0: - message.changeStateReasonType = 0; - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED": - case 1: - message.changeStateReasonType = 1; - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED": - case 2: - message.changeStateReasonType = 2; - break; - case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED": - case 3: - message.changeStateReasonType = 3; - break; - } - if (object.changeEffectiveTime != null) { - if (typeof object.changeEffectiveTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.changeEffectiveTime: object expected"); - message.changeEffectiveTime = $root.google.protobuf.Timestamp.fromObject(object.changeEffectiveTime); - } - if (object.createTime != null) { - if (typeof object.createTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.createTime: object expected"); - message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); - } - if (object.updateTime != null) { - if (typeof object.updateTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.updateTime: object expected"); - message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Parameter.value: object expected"); + message.value = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.fromObject(object.value); } return message; }; /** - * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. + * Creates a plain object from a Parameter message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} message LineItemChange + * @param {google.cloud.commerce.consumer.procurement.v1.Parameter} message Parameter * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - LineItemChange.toObject = function toObject(message, options) { + Parameter.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.changeId = ""; - object.changeType = options.enums === String ? "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED" : 0; - object.oldLineItemInfo = null; - object.newLineItemInfo = null; - object.changeState = options.enums === String ? "LINE_ITEM_CHANGE_STATE_UNSPECIFIED" : 0; - object.stateReason = ""; - object.changeEffectiveTime = null; - object.createTime = null; - object.updateTime = null; - object.changeStateReasonType = options.enums === String ? "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED" : 0; + object.name = ""; + object.value = null; } - if (message.changeId != null && message.hasOwnProperty("changeId")) - object.changeId = message.changeId; - if (message.changeType != null && message.hasOwnProperty("changeType")) - object.changeType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType[message.changeType] === undefined ? message.changeType : $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType[message.changeType] : message.changeType; - if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) - object.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.oldLineItemInfo, options); - if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) - object.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.newLineItemInfo, options); - if (message.changeState != null && message.hasOwnProperty("changeState")) - object.changeState = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState[message.changeState] === undefined ? message.changeState : $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState[message.changeState] : message.changeState; - if (message.stateReason != null && message.hasOwnProperty("stateReason")) - object.stateReason = message.stateReason; - if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) - object.changeEffectiveTime = $root.google.protobuf.Timestamp.toObject(message.changeEffectiveTime, options); - if (message.createTime != null && message.hasOwnProperty("createTime")) - object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); - if (message.updateTime != null && message.hasOwnProperty("updateTime")) - object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); - if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) - object.changeStateReasonType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType[message.changeStateReasonType] === undefined ? message.changeStateReasonType : $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType[message.changeStateReasonType] : message.changeStateReasonType; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value.toObject(message.value, options); return object; }; /** - * Converts this LineItemChange to JSON. + * Converts this Parameter to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @instance * @returns {Object.} JSON object */ - LineItemChange.prototype.toJSON = function toJSON() { + Parameter.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for LineItemChange + * Gets the default type url for Parameter * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - LineItemChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Parameter"; }; - return LineItemChange; - })(); + Parameter.Value = (function() { - v1alpha1.LineItemInfo = (function() { + /** + * Properties of a Value. + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @interface IValue + * @property {number|Long|null} [int64Value] Value int64Value + * @property {string|null} [stringValue] Value stringValue + * @property {number|null} [doubleValue] Value doubleValue + */ - /** - * Properties of a LineItemInfo. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface ILineItemInfo - * @property {string|null} [offer] LineItemInfo offer - * @property {Array.|null} [parameters] LineItemInfo parameters - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null} [subscription] LineItemInfo subscription - */ + /** + * Constructs a new Value. + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Constructs a new LineItemInfo. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a LineItemInfo. - * @implements ILineItemInfo - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo=} [properties] Properties to set - */ - function LineItemInfo(properties) { - this.parameters = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * Value int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @instance + */ + Value.prototype.int64Value = null; - /** - * LineItemInfo offer. - * @member {string} offer - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @instance - */ - LineItemInfo.prototype.offer = ""; + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @instance + */ + Value.prototype.stringValue = null; - /** - * LineItemInfo parameters. - * @member {Array.} parameters - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @instance - */ - LineItemInfo.prototype.parameters = $util.emptyArray; + /** + * Value doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @instance + */ + Value.prototype.doubleValue = null; - /** - * LineItemInfo subscription. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null|undefined} subscription - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @instance - */ - LineItemInfo.prototype.subscription = null; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Creates a new LineItemInfo instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo instance - */ - LineItemInfo.create = function create(properties) { - return new LineItemInfo(properties); - }; + /** + * Value kind. + * @member {"int64Value"|"stringValue"|"doubleValue"|undefined} kind + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "stringValue", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. - * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo} message LineItemInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LineItemInfo.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.parameters != null && message.parameters.length) - for (var i = 0; i < message.parameters.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.encode(message.parameters[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); - if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.encode(message.subscription, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); - if (message.offer != null && Object.hasOwnProperty.call(message, "offer")) - writer.uint32(/* id 13, wireType 2 =*/106).string(message.offer); - return writer; - }; + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; - /** - * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo} message LineItemInfo message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - LineItemInfo.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.int64Value); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.doubleValue); + return writer; + }; - /** - * Decodes a LineItemInfo message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - LineItemInfo.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 13: { - message.offer = reader.string(); + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Parameter.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.int64Value = reader.int64(); + break; + } + case 4: { + message.stringValue = reader.string(); + break; + } + case 5: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); break; } - case 9: { - if (!(message.parameters && message.parameters.length)) - message.parameters = []; - message.parameters.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.decode(reader, reader.uint32())); - break; - } - case 10: { - message.subscription = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.kind = 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.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1.Parameter.Value(); + 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.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.Parameter.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.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.kind = "int64Value"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.kind = "doubleValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.Parameter.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Parameter.Value"; + }; + + return Value; + })(); + + return Parameter; + })(); + + v1.Subscription = (function() { /** - * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing + * Properties of a Subscription. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface ISubscription + * @property {google.protobuf.ITimestamp|null} [startTime] Subscription startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Subscription endTime + * @property {boolean|null} [autoRenewalEnabled] Subscription autoRenewalEnabled */ - LineItemInfo.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; /** - * Verifies a LineItemInfo message. - * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * Constructs a new Subscription. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a Subscription. + * @implements ISubscription + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription=} [properties] Properties to set + */ + function Subscription(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Subscription startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @instance + */ + Subscription.prototype.startTime = null; + + /** + * Subscription endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @instance + */ + Subscription.prototype.endTime = null; + + /** + * Subscription autoRenewalEnabled. + * @member {boolean} autoRenewalEnabled + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription + * @instance + */ + Subscription.prototype.autoRenewalEnabled = false; + + /** + * Creates a new Subscription instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not + * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription instance */ - LineItemInfo.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.offer != null && message.hasOwnProperty("offer")) - if (!$util.isString(message.offer)) - return "offer: string expected"; - if (message.parameters != null && message.hasOwnProperty("parameters")) { - if (!Array.isArray(message.parameters)) - return "parameters: array expected"; - for (var i = 0; i < message.parameters.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify(message.parameters[i]); - if (error) - return "parameters." + error; - } - } - if (message.subscription != null && message.hasOwnProperty("subscription")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify(message.subscription); - if (error) - return "subscription." + error; - } - return null; + Subscription.create = function create(properties) { + return new Subscription(properties); }; /** - * Creates a LineItemInfo message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo - */ - LineItemInfo.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo) - return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo(); - if (object.offer != null) - message.offer = String(object.offer); - if (object.parameters) { - if (!Array.isArray(object.parameters)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.parameters: array expected"); - message.parameters = []; - for (var i = 0; i < object.parameters.length; ++i) { - if (typeof object.parameters[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.parameters: object expected"); - message.parameters[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.fromObject(object.parameters[i]); - } - } - if (object.subscription != null) { - if (typeof object.subscription !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.subscription: object expected"); - message.subscription = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.fromObject(object.subscription); - } - return message; - }; - - /** - * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} message LineItemInfo - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - LineItemInfo.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.parameters = []; - if (options.defaults) { - object.subscription = null; - object.offer = ""; - } - if (message.parameters && message.parameters.length) { - object.parameters = []; - for (var j = 0; j < message.parameters.length; ++j) - object.parameters[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.toObject(message.parameters[j], options); - } - if (message.subscription != null && message.hasOwnProperty("subscription")) - object.subscription = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.toObject(message.subscription, options); - if (message.offer != null && message.hasOwnProperty("offer")) - object.offer = message.offer; - return object; - }; - - /** - * Converts this LineItemInfo to JSON. - * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @instance - * @returns {Object.} JSON object - */ - LineItemInfo.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for LineItemInfo - * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - LineItemInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo"; - }; - - return LineItemInfo; - })(); - - v1alpha1.Parameter = (function() { - - /** - * Properties of a Parameter. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface IParameter - * @property {string|null} [name] Parameter name - * @property {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null} [value] Parameter value - */ - - /** - * Constructs a new Parameter. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a Parameter. - * @implements IParameter - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter=} [properties] Properties to set - */ - function Parameter(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * Parameter name. - * @member {string} name - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter - * @instance - */ - Parameter.prototype.name = ""; - - /** - * Parameter value. - * @member {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null|undefined} value - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter - * @instance - */ - Parameter.prototype.value = null; - - /** - * Creates a new Parameter instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter instance - */ - Parameter.create = function create(properties) { - return new Parameter(properties); - }; - - /** - * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter} message Parameter message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription} message Subscription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Parameter.encode = function encode(message, writer) { + Subscription.encode = function encode(message, writer) { if (!writer) 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 && Object.hasOwnProperty.call(message, "value")) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.autoRenewalEnabled != null && Object.hasOwnProperty.call(message, "autoRenewalEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRenewalEnabled); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.Subscription.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter} message Parameter message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.ISubscription} message Subscription message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Parameter.encodeDelimited = function encodeDelimited(message, writer) { + Subscription.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Parameter message from the specified reader or buffer. + * Decodes a Subscription message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter + * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Parameter.decode = function decode(reader, length) { + Subscription.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.Subscription(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } case 1: { - message.name = reader.string(); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.value = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.decode(reader, reader.uint32()); + message.autoRenewalEnabled = reader.bool(); break; } default: @@ -5491,427 +5480,369 @@ }; /** - * Decodes a Parameter message from the specified reader or buffer, length delimited. + * Decodes a Subscription message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter + * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Parameter.decodeDelimited = function decodeDelimited(reader) { + Subscription.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Parameter message. + * Verifies a Subscription message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Parameter.verify = function verify(message) { + Subscription.verify = function verify(message) { if (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")) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify(message.value); + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); if (error) - return "value." + error; + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; } + if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) + if (typeof message.autoRenewalEnabled !== "boolean") + return "autoRenewalEnabled: boolean expected"; return null; }; /** - * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * Creates a Subscription message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter + * @returns {google.cloud.commerce.consumer.procurement.v1.Subscription} Subscription */ - Parameter.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter) + Subscription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.Subscription) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter(); - if (object.name != null) - message.name = String(object.name); - if (object.value != null) { - if (typeof object.value !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.value: object expected"); - message.value = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.fromObject(object.value); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.Subscription(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Subscription.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.Subscription.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); } + if (object.autoRenewalEnabled != null) + message.autoRenewalEnabled = Boolean(object.autoRenewalEnabled); return message; }; /** - * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * Creates a plain object from a Subscription message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} message Parameter + * @param {google.cloud.commerce.consumer.procurement.v1.Subscription} message Subscription * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Parameter.toObject = function toObject(message, options) { + Subscription.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.name = ""; - object.value = null; + object.endTime = null; + object.autoRenewalEnabled = false; + object.startTime = null; } - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - if (message.value != null && message.hasOwnProperty("value")) - object.value = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.toObject(message.value, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) + object.autoRenewalEnabled = message.autoRenewalEnabled; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this Parameter to JSON. + * Converts this Subscription to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @instance * @returns {Object.} JSON object */ - Parameter.prototype.toJSON = function toJSON() { + Subscription.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Parameter + * Gets the default type url for Subscription * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @memberof google.cloud.commerce.consumer.procurement.v1.Subscription * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Subscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Parameter"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.Subscription"; }; - Parameter.Value = (function() { - - /** - * Properties of a Value. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter - * @interface IValue - * @property {number|Long|null} [int64Value] Value int64Value - * @property {string|null} [stringValue] Value stringValue - * @property {number|null} [doubleValue] Value doubleValue - */ + return Subscription; + })(); - /** - * Constructs a new Value. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter - * @classdesc Represents a Value. - * @implements IValue - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue=} [properties] Properties to set - */ - function Value(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + v1.ConsumerProcurementService = (function() { - /** - * Value int64Value. - * @member {number|Long|null|undefined} int64Value - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @instance - */ - Value.prototype.int64Value = null; + /** + * Constructs a new ConsumerProcurementService service. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a ConsumerProcurementService + * @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 ConsumerProcurementService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } - /** - * Value stringValue. - * @member {string|null|undefined} stringValue - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @instance - */ - Value.prototype.stringValue = null; + (ConsumerProcurementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConsumerProcurementService; - /** - * Value doubleValue. - * @member {number|null|undefined} doubleValue - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @instance - */ - Value.prototype.doubleValue = null; + /** + * Creates new ConsumerProcurementService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @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 {ConsumerProcurementService} RPC service. Useful where requests and/or responses are streamed. + */ + ConsumerProcurementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|placeOrder}. + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @typedef PlaceOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Value kind. - * @member {"int64Value"|"stringValue"|"doubleValue"|undefined} kind - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @instance - */ - Object.defineProperty(Value.prototype, "kind", { - get: $util.oneOfGetter($oneOfFields = ["int64Value", "stringValue", "doubleValue"]), - set: $util.oneOfSetter($oneOfFields) - }); + /** + * Calls PlaceOrder. + * @function placeOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.PlaceOrderCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.placeOrder = function placeOrder(request, callback) { + return this.rpcCall(placeOrder, $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PlaceOrder" }); - /** - * Creates a new Value instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value instance - */ - Value.create = function create(properties) { - return new Value(properties); - }; + /** + * Calls PlaceOrder. + * @function placeOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. - * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) - writer.uint32(/* id 3, wireType 0 =*/24).int64(message.int64Value); - if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); - if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) - writer.uint32(/* id 5, wireType 1 =*/41).double(message.doubleValue); - return writer; - }; + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|getOrder}. + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @typedef GetOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.Order} [response] Order + */ - /** - * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue} message Value message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Value.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * Calls GetOrder. + * @function getOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} request GetOrderRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.GetOrderCallback} callback Node-style callback called with the error, if any, and Order + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.getOrder = function getOrder(request, callback) { + return this.rpcCall(getOrder, $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest, $root.google.cloud.commerce.consumer.procurement.v1.Order, request, callback); + }, "name", { value: "GetOrder" }); - /** - * Decodes a Value message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 3: { - message.int64Value = reader.int64(); - break; - } - case 4: { - message.stringValue = reader.string(); - break; - } - case 5: { - message.doubleValue = reader.double(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Calls GetOrder. + * @function getOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} request GetOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Decodes a Value message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Value.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|listOrders}. + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @typedef ListOrdersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} [response] ListOrdersResponse + */ - /** - * Verifies a Value message. - * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Value.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - var properties = {}; - if (message.int64Value != null && message.hasOwnProperty("int64Value")) { - properties.kind = 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.stringValue != null && message.hasOwnProperty("stringValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (!$util.isString(message.stringValue)) - return "stringValue: string expected"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - if (properties.kind === 1) - return "kind: multiple values"; - properties.kind = 1; - if (typeof message.doubleValue !== "number") - return "doubleValue: number expected"; - } - return null; - }; + /** + * Calls ListOrders. + * @function listOrders + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} request ListOrdersRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ListOrdersCallback} callback Node-style callback called with the error, if any, and ListOrdersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.listOrders = function listOrders(request, callback) { + return this.rpcCall(listOrders, $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest, $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse, request, callback); + }, "name", { value: "ListOrders" }); - /** - * Creates a Value message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value - */ - Value.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value) - return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value(); - 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.stringValue != null) - message.stringValue = String(object.stringValue); - if (object.doubleValue != null) - message.doubleValue = Number(object.doubleValue); - return message; - }; + /** + * Calls ListOrders. + * @function listOrders + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} request ListOrdersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - /** - * Creates a plain object from a Value message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} message Value - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Value.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (message.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.kind = "int64Value"; - } - if (message.stringValue != null && message.hasOwnProperty("stringValue")) { - object.stringValue = message.stringValue; - if (options.oneofs) - object.kind = "stringValue"; - } - if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { - object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; - if (options.oneofs) - object.kind = "doubleValue"; - } - return object; - }; + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|modifyOrder}. + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @typedef ModifyOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - /** - * Converts this Value to JSON. - * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @instance - * @returns {Object.} JSON object - */ - Value.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Calls ModifyOrder. + * @function modifyOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest} request ModifyOrderRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrderCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.modifyOrder = function modifyOrder(request, callback) { + return this.rpcCall(modifyOrder, $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ModifyOrder" }); - /** - * Gets the default type url for Value - * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value"; - }; + /** + * Calls ModifyOrder. + * @function modifyOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest} request ModifyOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ - return Value; - })(); + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService|cancelOrder}. + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @typedef CancelOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ - return Parameter; + /** + * Calls CancelOrder. + * @function cancelOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest} request CancelOrderRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrderCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.cancelOrder = function cancelOrder(request, callback) { + return this.rpcCall(cancelOrder, $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "CancelOrder" }); + + /** + * Calls CancelOrder. + * @function cancelOrder + * @memberof google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest} request CancelOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConsumerProcurementService; })(); - v1alpha1.Subscription = (function() { + /** + * AutoRenewalBehavior enum. + * @name google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior + * @enum {number} + * @property {number} AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED=0 AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED value + * @property {number} AUTO_RENEWAL_BEHAVIOR_ENABLE=1 AUTO_RENEWAL_BEHAVIOR_ENABLE value + * @property {number} AUTO_RENEWAL_BEHAVIOR_DISABLE=2 AUTO_RENEWAL_BEHAVIOR_DISABLE value + */ + v1.AutoRenewalBehavior = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED"] = 0; + values[valuesById[1] = "AUTO_RENEWAL_BEHAVIOR_ENABLE"] = 1; + values[valuesById[2] = "AUTO_RENEWAL_BEHAVIOR_DISABLE"] = 2; + return values; + })(); + + v1.PlaceOrderRequest = (function() { /** - * Properties of a Subscription. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface ISubscription - * @property {google.protobuf.ITimestamp|null} [startTime] Subscription startTime - * @property {google.protobuf.ITimestamp|null} [endTime] Subscription endTime - * @property {boolean|null} [autoRenewalEnabled] Subscription autoRenewalEnabled + * Properties of a PlaceOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IPlaceOrderRequest + * @property {string|null} [parent] PlaceOrderRequest parent + * @property {string|null} [displayName] PlaceOrderRequest displayName + * @property {Array.|null} [lineItemInfo] PlaceOrderRequest lineItemInfo + * @property {string|null} [requestId] PlaceOrderRequest requestId */ /** - * Constructs a new Subscription. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a Subscription. - * @implements ISubscription + * Constructs a new PlaceOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a PlaceOrderRequest. + * @implements IPlaceOrderRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest=} [properties] Properties to set */ - function Subscription(properties) { + function PlaceOrderRequest(properties) { + this.lineItemInfo = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5919,103 +5850,120 @@ } /** - * Subscription startTime. - * @member {google.protobuf.ITimestamp|null|undefined} startTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * PlaceOrderRequest parent. + * @member {string} parent + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @instance */ - Subscription.prototype.startTime = null; + PlaceOrderRequest.prototype.parent = ""; /** - * Subscription endTime. - * @member {google.protobuf.ITimestamp|null|undefined} endTime - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * PlaceOrderRequest displayName. + * @member {string} displayName + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @instance */ - Subscription.prototype.endTime = null; + PlaceOrderRequest.prototype.displayName = ""; /** - * Subscription autoRenewalEnabled. - * @member {boolean} autoRenewalEnabled - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * PlaceOrderRequest lineItemInfo. + * @member {Array.} lineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @instance */ - Subscription.prototype.autoRenewalEnabled = false; + PlaceOrderRequest.prototype.lineItemInfo = $util.emptyArray; /** - * Creates a new Subscription instance using the specified properties. + * PlaceOrderRequest requestId. + * @member {string} requestId + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest + * @instance + */ + PlaceOrderRequest.prototype.requestId = ""; + + /** + * Creates a new PlaceOrderRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription instance + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest instance */ - Subscription.create = function create(properties) { - return new Subscription(properties); + PlaceOrderRequest.create = function create(properties) { + return new PlaceOrderRequest(properties); }; /** - * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription} message Subscription message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Subscription.encode = function encode(message, writer) { + PlaceOrderRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) - $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.autoRenewalEnabled != null && Object.hasOwnProperty.call(message, "autoRenewalEnabled")) - writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRenewalEnabled); - if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) - $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.requestId); + if (message.lineItemInfo != null && message.lineItemInfo.length) + for (var i = 0; i < message.lineItemInfo.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.lineItemInfo[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription} message Subscription message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Subscription.encodeDelimited = function encodeDelimited(message, writer) { + PlaceOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Subscription message from the specified reader or buffer. + * Decodes a PlaceOrderRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Subscription.decode = function decode(reader, length) { + PlaceOrderRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 3: { - message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 1: { + message.parent = reader.string(); break; } - case 1: { - message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + case 6: { + message.displayName = reader.string(); break; } - case 2: { - message.autoRenewalEnabled = reader.bool(); + case 10: { + if (!(message.lineItemInfo && message.lineItemInfo.length)) + message.lineItemInfo = []; + message.lineItemInfo.push($root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32())); + break; + } + case 7: { + message.requestId = reader.string(); break; } default: @@ -6027,410 +5975,228 @@ }; /** - * Decodes a Subscription message from the specified reader or buffer, length delimited. + * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Subscription.decodeDelimited = function decodeDelimited(reader) { + PlaceOrderRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Subscription message. + * Verifies a PlaceOrderRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Subscription.verify = function verify(message) { + PlaceOrderRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.startTime != null && message.hasOwnProperty("startTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.startTime); - if (error) - return "startTime." + error; - } - if (message.endTime != null && message.hasOwnProperty("endTime")) { - var error = $root.google.protobuf.Timestamp.verify(message.endTime); - if (error) - return "endTime." + error; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { + if (!Array.isArray(message.lineItemInfo)) + return "lineItemInfo: array expected"; + for (var i = 0; i < message.lineItemInfo.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.lineItemInfo[i]); + if (error) + return "lineItemInfo." + error; + } } - if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) - if (typeof message.autoRenewalEnabled !== "boolean") - return "autoRenewalEnabled: boolean expected"; + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; return null; }; /** - * Creates a Subscription message from a plain object. Also converts values to their respective internal types. + * Creates a PlaceOrderRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} PlaceOrderRequest */ - Subscription.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription) + PlaceOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription(); - if (object.startTime != null) { - if (typeof object.startTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.startTime: object expected"); - message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); - } - if (object.endTime != null) { - if (typeof object.endTime !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.endTime: object expected"); - message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.lineItemInfo) { + if (!Array.isArray(object.lineItemInfo)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.lineItemInfo: array expected"); + message.lineItemInfo = []; + for (var i = 0; i < object.lineItemInfo.length; ++i) { + if (typeof object.lineItemInfo[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest.lineItemInfo: object expected"); + message.lineItemInfo[i] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.lineItemInfo[i]); + } } - if (object.autoRenewalEnabled != null) - message.autoRenewalEnabled = Boolean(object.autoRenewalEnabled); + if (object.requestId != null) + message.requestId = String(object.requestId); return message; }; /** - * Creates a plain object from a Subscription message. Also converts values to other types if specified. + * Creates a plain object from a PlaceOrderRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} message Subscription + * @param {google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest} message PlaceOrderRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Subscription.toObject = function toObject(message, options) { + PlaceOrderRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.lineItemInfo = []; if (options.defaults) { - object.endTime = null; - object.autoRenewalEnabled = false; - object.startTime = null; + object.parent = ""; + object.displayName = ""; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.lineItemInfo && message.lineItemInfo.length) { + object.lineItemInfo = []; + for (var j = 0; j < message.lineItemInfo.length; ++j) + object.lineItemInfo[j] = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.lineItemInfo[j], options); } - if (message.endTime != null && message.hasOwnProperty("endTime")) - object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); - if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) - object.autoRenewalEnabled = message.autoRenewalEnabled; - if (message.startTime != null && message.hasOwnProperty("startTime")) - object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); return object; }; /** - * Converts this Subscription to JSON. + * Converts this PlaceOrderRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @instance * @returns {Object.} JSON object */ - Subscription.prototype.toJSON = function toJSON() { + PlaceOrderRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Subscription + * Gets the default type url for PlaceOrderRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Subscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PlaceOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Subscription"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.PlaceOrderRequest"; }; - return Subscription; + return PlaceOrderRequest; })(); - v1alpha1.ConsumerProcurementService = (function() { + v1.PlaceOrderMetadata = (function() { /** - * Constructs a new ConsumerProcurementService service. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a ConsumerProcurementService - * @extends $protobuf.rpc.Service + * Properties of a PlaceOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IPlaceOrderMetadata + */ + + /** + * Constructs a new PlaceOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a PlaceOrderMetadata. + * @implements IPlaceOrderMetadata * @constructor - * @param {$protobuf.RPCImpl} rpcImpl RPC implementation - * @param {boolean} [requestDelimited=false] Whether requests are length-delimited - * @param {boolean} [responseDelimited=false] Whether responses are length-delimited + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata=} [properties] Properties to set */ - function ConsumerProcurementService(rpcImpl, requestDelimited, responseDelimited) { - $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + function PlaceOrderMetadata(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; } - (ConsumerProcurementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConsumerProcurementService; - /** - * Creates new ConsumerProcurementService service using the specified rpc implementation. + * Creates a new PlaceOrderMetadata instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @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 {ConsumerProcurementService} RPC service. Useful where requests and/or responses are streamed. + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata instance */ - ConsumerProcurementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { - return new this(rpcImpl, requestDelimited, responseDelimited); - }; - - /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|placeOrder}. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @typedef PlaceOrderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.longrunning.Operation} [response] Operation - */ - - /** - * Calls PlaceOrder. - * @function placeOrder - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.PlaceOrderCallback} callback Node-style callback called with the error, if any, and Operation - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConsumerProcurementService.prototype.placeOrder = function placeOrder(request, callback) { - return this.rpcCall(placeOrder, $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest, $root.google.longrunning.Operation, request, callback); - }, "name", { value: "PlaceOrder" }); - - /** - * Calls PlaceOrder. - * @function placeOrder - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|getOrder}. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @typedef GetOrderCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Order} [response] Order - */ - - /** - * Calls GetOrder. - * @function getOrder - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} request GetOrderRequest message or plain object - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.GetOrderCallback} callback Node-style callback called with the error, if any, and Order - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConsumerProcurementService.prototype.getOrder = function getOrder(request, callback) { - return this.rpcCall(getOrder, $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest, $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order, request, callback); - }, "name", { value: "GetOrder" }); - - /** - * Calls GetOrder. - * @function getOrder - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} request GetOrderRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - /** - * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|listOrders}. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @typedef ListOrdersCallback - * @type {function} - * @param {Error|null} error Error, if any - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} [response] ListOrdersResponse - */ - - /** - * Calls ListOrders. - * @function listOrders - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} request ListOrdersRequest message or plain object - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.ListOrdersCallback} callback Node-style callback called with the error, if any, and ListOrdersResponse - * @returns {undefined} - * @variation 1 - */ - Object.defineProperty(ConsumerProcurementService.prototype.listOrders = function listOrders(request, callback) { - return this.rpcCall(listOrders, $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest, $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse, request, callback); - }, "name", { value: "ListOrders" }); - - /** - * Calls ListOrders. - * @function listOrders - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService - * @instance - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} request ListOrdersRequest message or plain object - * @returns {Promise} Promise - * @variation 2 - */ - - return ConsumerProcurementService; - })(); - - v1alpha1.PlaceOrderRequest = (function() { - - /** - * Properties of a PlaceOrderRequest. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface IPlaceOrderRequest - * @property {string|null} [parent] PlaceOrderRequest parent - * @property {string|null} [displayName] PlaceOrderRequest displayName - * @property {Array.|null} [lineItemInfo] PlaceOrderRequest lineItemInfo - * @property {string|null} [requestId] PlaceOrderRequest requestId - */ - - /** - * Constructs a new PlaceOrderRequest. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a PlaceOrderRequest. - * @implements IPlaceOrderRequest - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest=} [properties] Properties to set - */ - function PlaceOrderRequest(properties) { - this.lineItemInfo = []; - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * PlaceOrderRequest parent. - * @member {string} parent - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest - * @instance - */ - PlaceOrderRequest.prototype.parent = ""; - - /** - * PlaceOrderRequest displayName. - * @member {string} displayName - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest - * @instance - */ - PlaceOrderRequest.prototype.displayName = ""; - - /** - * PlaceOrderRequest lineItemInfo. - * @member {Array.} lineItemInfo - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest - * @instance - */ - PlaceOrderRequest.prototype.lineItemInfo = $util.emptyArray; - - /** - * PlaceOrderRequest requestId. - * @member {string} requestId - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest - * @instance - */ - PlaceOrderRequest.prototype.requestId = ""; - - /** - * Creates a new PlaceOrderRequest instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest instance - */ - PlaceOrderRequest.create = function create(properties) { - return new PlaceOrderRequest(properties); + PlaceOrderMetadata.create = function create(properties) { + return new PlaceOrderMetadata(properties); }; /** - * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderRequest.encode = function encode(message, writer) { + PlaceOrderMetadata.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); - if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.requestId); - if (message.lineItemInfo != null && message.lineItemInfo.length) - for (var i = 0; i < message.lineItemInfo.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.lineItemInfo[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); return writer; }; /** - * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + PlaceOrderMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlaceOrderRequest message from the specified reader or buffer. + * Decodes a PlaceOrderMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderRequest.decode = function decode(reader, length) { + PlaceOrderMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } - case 6: { - message.displayName = reader.string(); - break; - } - case 10: { - if (!(message.lineItemInfo && message.lineItemInfo.length)) - message.lineItemInfo = []; - message.lineItemInfo.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32())); - break; - } - case 7: { - message.requestId = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -6440,164 +6206,109 @@ }; /** - * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. + * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderRequest.decodeDelimited = function decodeDelimited(reader) { + PlaceOrderMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlaceOrderRequest message. + * Verifies a PlaceOrderMetadata message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlaceOrderRequest.verify = function verify(message) { + PlaceOrderMetadata.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.displayName != null && message.hasOwnProperty("displayName")) - if (!$util.isString(message.displayName)) - return "displayName: string expected"; - if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { - if (!Array.isArray(message.lineItemInfo)) - return "lineItemInfo: array expected"; - for (var i = 0; i < message.lineItemInfo.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.lineItemInfo[i]); - if (error) - return "lineItemInfo." + error; - } - } - if (message.requestId != null && message.hasOwnProperty("requestId")) - if (!$util.isString(message.requestId)) - return "requestId: string expected"; return null; }; /** - * Creates a PlaceOrderRequest message from a plain object. Also converts values to their respective internal types. + * Creates a PlaceOrderMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} PlaceOrderMetadata */ - PlaceOrderRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest) + PlaceOrderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.displayName != null) - message.displayName = String(object.displayName); - if (object.lineItemInfo) { - if (!Array.isArray(object.lineItemInfo)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.lineItemInfo: array expected"); - message.lineItemInfo = []; - for (var i = 0; i < object.lineItemInfo.length; ++i) { - if (typeof object.lineItemInfo[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.lineItemInfo: object expected"); - message.lineItemInfo[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.lineItemInfo[i]); - } - } - if (object.requestId != null) - message.requestId = String(object.requestId); - return message; + return new $root.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata(); }; /** - * Creates a plain object from a PlaceOrderRequest message. Also converts values to other types if specified. + * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} message PlaceOrderRequest + * @param {google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata} message PlaceOrderMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlaceOrderRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.arrays || options.defaults) - object.lineItemInfo = []; - if (options.defaults) { - object.parent = ""; - object.displayName = ""; - object.requestId = ""; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.displayName != null && message.hasOwnProperty("displayName")) - object.displayName = message.displayName; - if (message.requestId != null && message.hasOwnProperty("requestId")) - object.requestId = message.requestId; - if (message.lineItemInfo && message.lineItemInfo.length) { - object.lineItemInfo = []; - for (var j = 0; j < message.lineItemInfo.length; ++j) - object.lineItemInfo[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.lineItemInfo[j], options); - } - return object; + PlaceOrderMetadata.toObject = function toObject() { + return {}; }; /** - * Converts this PlaceOrderRequest to JSON. + * Converts this PlaceOrderMetadata to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @instance * @returns {Object.} JSON object */ - PlaceOrderRequest.prototype.toJSON = function toJSON() { + PlaceOrderMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PlaceOrderRequest + * Gets the default type url for PlaceOrderMetadata * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PlaceOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PlaceOrderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata"; }; - return PlaceOrderRequest; + return PlaceOrderMetadata; })(); - v1alpha1.PlaceOrderMetadata = (function() { + v1.GetOrderRequest = (function() { /** - * Properties of a PlaceOrderMetadata. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface IPlaceOrderMetadata + * Properties of a GetOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IGetOrderRequest + * @property {string|null} [name] GetOrderRequest name */ /** - * Constructs a new PlaceOrderMetadata. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a PlaceOrderMetadata. - * @implements IPlaceOrderMetadata + * Constructs a new GetOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a GetOrderRequest. + * @implements IGetOrderRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest=} [properties] Properties to set */ - function PlaceOrderMetadata(properties) { + function GetOrderRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6605,63 +6316,77 @@ } /** - * Creates a new PlaceOrderMetadata instance using the specified properties. + * GetOrderRequest name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest + * @instance + */ + GetOrderRequest.prototype.name = ""; + + /** + * Creates a new GetOrderRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata instance + * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest instance */ - PlaceOrderMetadata.create = function create(properties) { - return new PlaceOrderMetadata(properties); + GetOrderRequest.create = function create(properties) { + return new GetOrderRequest(properties); }; /** - * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderMetadata.encode = function encode(message, writer) { + GetOrderRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.GetOrderRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IGetOrderRequest} message GetOrderRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PlaceOrderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + GetOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PlaceOrderMetadata message from the specified reader or buffer. + * Decodes a GetOrderRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata + * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderMetadata.decode = function decode(reader, length) { + GetOrderRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -6671,109 +6396,125 @@ }; /** - * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. + * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata + * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - PlaceOrderMetadata.decodeDelimited = function decodeDelimited(reader) { + GetOrderRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PlaceOrderMetadata message. + * Verifies a GetOrderRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - PlaceOrderMetadata.verify = function verify(message) { + GetOrderRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a PlaceOrderMetadata message from a plain object. Also converts values to their respective internal types. + * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata + * @returns {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} GetOrderRequest */ - PlaceOrderMetadata.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata) + GetOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest) return object; - return new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata(); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.GetOrderRequest(); + if (object.name != null) + message.name = String(object.name); + return message; }; /** - * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. + * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} message PlaceOrderMetadata + * @param {google.cloud.commerce.consumer.procurement.v1.GetOrderRequest} message GetOrderRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PlaceOrderMetadata.toObject = function toObject() { - return {}; + GetOrderRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; }; /** - * Converts this PlaceOrderMetadata to JSON. + * Converts this GetOrderRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @instance * @returns {Object.} JSON object */ - PlaceOrderMetadata.prototype.toJSON = function toJSON() { + GetOrderRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PlaceOrderMetadata + * Gets the default type url for GetOrderRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @memberof google.cloud.commerce.consumer.procurement.v1.GetOrderRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PlaceOrderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.GetOrderRequest"; }; - return PlaceOrderMetadata; + return GetOrderRequest; })(); - v1alpha1.GetOrderRequest = (function() { + v1.ListOrdersRequest = (function() { /** - * Properties of a GetOrderRequest. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface IGetOrderRequest - * @property {string|null} [name] GetOrderRequest name + * Properties of a ListOrdersRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IListOrdersRequest + * @property {string|null} [parent] ListOrdersRequest parent + * @property {number|null} [pageSize] ListOrdersRequest pageSize + * @property {string|null} [pageToken] ListOrdersRequest pageToken + * @property {string|null} [filter] ListOrdersRequest filter */ /** - * Constructs a new GetOrderRequest. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a GetOrderRequest. - * @implements IGetOrderRequest + * Constructs a new ListOrdersRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a ListOrdersRequest. + * @implements IListOrdersRequest * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest=} [properties] Properties to set */ - function GetOrderRequest(properties) { + function ListOrdersRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -6781,223 +6522,17 @@ } /** - * GetOrderRequest name. - * @member {string} name - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * ListOrdersRequest parent. + * @member {string} parent + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @instance */ - GetOrderRequest.prototype.name = ""; - - /** - * Creates a new GetOrderRequest instance using the specified properties. - * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest instance - */ - GetOrderRequest.create = function create(properties) { - return new GetOrderRequest(properties); - }; - - /** - * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. - * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} message GetOrderRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOrderRequest.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); - return writer; - }; - - /** - * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. - * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} message GetOrderRequest message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - GetOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; - - /** - * Decodes a GetOrderRequest message from the specified reader or buffer. - * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOrderRequest.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; - - /** - * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - GetOrderRequest.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; - - /** - * Verifies a GetOrderRequest message. - * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - GetOrderRequest.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.name != null && message.hasOwnProperty("name")) - if (!$util.isString(message.name)) - return "name: string expected"; - return null; - }; - - /** - * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest - */ - GetOrderRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest) - return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest(); - if (object.name != null) - message.name = String(object.name); - return message; - }; - - /** - * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. - * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} message GetOrderRequest - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - GetOrderRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.name = ""; - if (message.name != null && message.hasOwnProperty("name")) - object.name = message.name; - return object; - }; - - /** - * Converts this GetOrderRequest to JSON. - * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @instance - * @returns {Object.} JSON object - */ - GetOrderRequest.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; - - /** - * Gets the default type url for GetOrderRequest - * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - GetOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest"; - }; - - return GetOrderRequest; - })(); - - v1alpha1.ListOrdersRequest = (function() { - - /** - * Properties of a ListOrdersRequest. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @interface IListOrdersRequest - * @property {string|null} [parent] ListOrdersRequest parent - * @property {number|null} [pageSize] ListOrdersRequest pageSize - * @property {string|null} [pageToken] ListOrdersRequest pageToken - * @property {string|null} [filter] ListOrdersRequest filter - */ - - /** - * Constructs a new ListOrdersRequest. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 - * @classdesc Represents a ListOrdersRequest. - * @implements IListOrdersRequest - * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest=} [properties] Properties to set - */ - function ListOrdersRequest(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * ListOrdersRequest parent. - * @member {string} parent - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest - * @instance - */ - ListOrdersRequest.prototype.parent = ""; + ListOrdersRequest.prototype.parent = ""; /** * ListOrdersRequest pageSize. * @member {number} pageSize - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @instance */ ListOrdersRequest.prototype.pageSize = 0; @@ -7005,7 +6540,7 @@ /** * ListOrdersRequest pageToken. * @member {string} pageToken - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @instance */ ListOrdersRequest.prototype.pageToken = ""; @@ -7013,7 +6548,7 @@ /** * ListOrdersRequest filter. * @member {string} filter - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @instance */ ListOrdersRequest.prototype.filter = ""; @@ -7021,21 +6556,21 @@ /** * Creates a new ListOrdersRequest instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest instance + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest instance */ ListOrdersRequest.create = function create(properties) { return new ListOrdersRequest(properties); }; /** - * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -7054,11 +6589,11 @@ }; /** - * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -7069,18 +6604,18 @@ /** * Decodes a ListOrdersRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ListOrdersRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -7111,10 +6646,10 @@ /** * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -7127,7 +6662,7 @@ /** * Verifies a ListOrdersRequest message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -7153,15 +6688,15 @@ /** * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} ListOrdersRequest */ ListOrdersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest) + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest(); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest(); if (object.parent != null) message.parent = String(object.parent); if (object.pageSize != null) @@ -7176,9 +6711,9 @@ /** * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} message ListOrdersRequest + * @param {google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest} message ListOrdersRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -7206,7 +6741,7 @@ /** * Converts this ListOrdersRequest to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @instance * @returns {Object.} JSON object */ @@ -7217,7 +6752,7 @@ /** * Gets the default type url for ListOrdersRequest * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url @@ -7226,29 +6761,29 @@ if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ListOrdersRequest"; }; return ListOrdersRequest; })(); - v1alpha1.ListOrdersResponse = (function() { + v1.ListOrdersResponse = (function() { /** * Properties of a ListOrdersResponse. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @memberof google.cloud.commerce.consumer.procurement.v1 * @interface IListOrdersResponse - * @property {Array.|null} [orders] ListOrdersResponse orders + * @property {Array.|null} [orders] ListOrdersResponse orders * @property {string|null} [nextPageToken] ListOrdersResponse nextPageToken */ /** * Constructs a new ListOrdersResponse. - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @memberof google.cloud.commerce.consumer.procurement.v1 * @classdesc Represents a ListOrdersResponse. * @implements IListOrdersResponse * @constructor - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse=} [properties] Properties to set + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse=} [properties] Properties to set */ function ListOrdersResponse(properties) { this.orders = []; @@ -7260,8 +6795,8 @@ /** * ListOrdersResponse orders. - * @member {Array.} orders - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @member {Array.} orders + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @instance */ ListOrdersResponse.prototype.orders = $util.emptyArray; @@ -7269,7 +6804,7 @@ /** * ListOrdersResponse nextPageToken. * @member {string} nextPageToken - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @instance */ ListOrdersResponse.prototype.nextPageToken = ""; @@ -7277,21 +6812,21 @@ /** * Creates a new ListOrdersResponse instance using the specified properties. * @function create - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse=} [properties] Properties to set - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse instance + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse instance */ ListOrdersResponse.create = function create(properties) { return new ListOrdersResponse(properties); }; /** - * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -7300,18 +6835,18 @@ writer = $Writer.create(); if (message.orders != null && message.orders.length) for (var i = 0; i < message.orders.length; ++i) - $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.encode(message.orders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + $root.google.cloud.commerce.consumer.procurement.v1.Order.encode(message.orders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); return writer; }; /** - * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {google.cloud.commerce.consumer.procurement.v1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ @@ -7322,25 +6857,25 @@ /** * Decodes a ListOrdersResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ ListOrdersResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { if (!(message.orders && message.orders.length)) message.orders = []; - message.orders.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.decode(reader, reader.uint32())); + message.orders.push($root.google.cloud.commerce.consumer.procurement.v1.Order.decode(reader, reader.uint32())); break; } case 2: { @@ -7358,10 +6893,10 @@ /** * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ @@ -7374,7 +6909,7 @@ /** * Verifies a ListOrdersResponse message. * @function verify - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not @@ -7386,7 +6921,7 @@ if (!Array.isArray(message.orders)) return "orders: array expected"; for (var i = 0; i < message.orders.length; ++i) { - var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify(message.orders[i]); + var error = $root.google.cloud.commerce.consumer.procurement.v1.Order.verify(message.orders[i]); if (error) return "orders." + error; } @@ -7400,23 +6935,23 @@ /** * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse + * @returns {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} ListOrdersResponse */ ListOrdersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse) + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse) return object; - var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse(); + var message = new $root.google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse(); if (object.orders) { if (!Array.isArray(object.orders)) - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.orders: array expected"); + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.orders: array expected"); message.orders = []; for (var i = 0; i < object.orders.length; ++i) { if (typeof object.orders[i] !== "object") - throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.orders: object expected"); - message.orders[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.fromObject(object.orders[i]); + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse.orders: object expected"); + message.orders[i] = $root.google.cloud.commerce.consumer.procurement.v1.Order.fromObject(object.orders[i]); } } if (object.nextPageToken != null) @@ -7427,9 +6962,9 @@ /** * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static - * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} message ListOrdersResponse + * @param {google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse} message ListOrdersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ @@ -7444,7 +6979,7 @@ if (message.orders && message.orders.length) { object.orders = []; for (var j = 0; j < message.orders.length; ++j) - object.orders[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.toObject(message.orders[j], options); + object.orders[j] = $root.google.cloud.commerce.consumer.procurement.v1.Order.toObject(message.orders[j], options); } if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) object.nextPageToken = message.nextPageToken; @@ -7454,7 +6989,7 @@ /** * Converts this ListOrdersResponse to JSON. * @function toJSON - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @instance * @returns {Object.} JSON object */ @@ -7465,7 +7000,7 @@ /** * Gets the default type url for ListOrdersResponse * @function getTypeUrl - * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @memberof google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url @@ -7474,630 +7009,5506 @@ if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse"; + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ListOrdersResponse"; }; return ListOrdersResponse; })(); - return v1alpha1; - })(); - - return procurement; - })(); + v1.ModifyOrderRequest = (function() { - return consumer; - })(); + /** + * Properties of a ModifyOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IModifyOrderRequest + * @property {string|null} [name] ModifyOrderRequest name + * @property {Array.|null} [modifications] ModifyOrderRequest modifications + * @property {string|null} [displayName] ModifyOrderRequest displayName + * @property {string|null} [etag] ModifyOrderRequest etag + */ - return commerce; - })(); + /** + * Constructs a new ModifyOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a ModifyOrderRequest. + * @implements IModifyOrderRequest + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest=} [properties] Properties to set + */ + function ModifyOrderRequest(properties) { + this.modifications = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - return cloud; - })(); + /** + * ModifyOrderRequest name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @instance + */ + ModifyOrderRequest.prototype.name = ""; - google.api = (function() { + /** + * ModifyOrderRequest modifications. + * @member {Array.} modifications + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @instance + */ + ModifyOrderRequest.prototype.modifications = $util.emptyArray; - /** - * Namespace api. - * @memberof google - * @namespace - */ - var api = {}; + /** + * ModifyOrderRequest displayName. + * @member {string} displayName + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @instance + */ + ModifyOrderRequest.prototype.displayName = ""; - /** - * 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; - })(); + /** + * ModifyOrderRequest etag. + * @member {string} etag + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @instance + */ + ModifyOrderRequest.prototype.etag = ""; - api.ResourceDescriptor = (function() { + /** + * Creates a new ModifyOrderRequest instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest} ModifyOrderRequest instance + */ + ModifyOrderRequest.create = function create(properties) { + return new ModifyOrderRequest(properties); + }; - /** - * Properties of a ResourceDescriptor. - * @memberof google.api - * @interface IResourceDescriptor - * @property {string|null} [type] ResourceDescriptor type - * @property {Array.|null} [pattern] ResourceDescriptor pattern - * @property {string|null} [nameField] ResourceDescriptor nameField - * @property {google.api.ResourceDescriptor.History|null} [history] ResourceDescriptor history - * @property {string|null} [plural] ResourceDescriptor plural - * @property {string|null} [singular] ResourceDescriptor singular - * @property {Array.|null} [style] ResourceDescriptor style - */ + /** + * Encodes the specified ModifyOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest} message ModifyOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyOrderRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.etag); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.displayName); + if (message.modifications != null && message.modifications.length) + for (var i = 0; i < message.modifications.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.encode(message.modifications[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + return writer; + }; - /** - * 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]]; - } + /** + * Encodes the specified ModifyOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest} message ModifyOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; - /** - * ResourceDescriptor type. - * @member {string} type - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.type = ""; + /** + * Decodes a ModifyOrderRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest} ModifyOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyOrderRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 6: { + if (!(message.modifications && message.modifications.length)) + message.modifications = []; + message.modifications.push($root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.decode(reader, reader.uint32())); + break; + } + case 5: { + message.displayName = reader.string(); + break; + } + case 4: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; - /** - * ResourceDescriptor pattern. - * @member {Array.} pattern - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.pattern = $util.emptyArray; + /** + * Decodes a ModifyOrderRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest} ModifyOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyOrderRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * ResourceDescriptor nameField. - * @member {string} nameField - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.nameField = ""; + /** + * Verifies a ModifyOrderRequest message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModifyOrderRequest.verify = function verify(message) { + if (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.modifications != null && message.hasOwnProperty("modifications")) { + if (!Array.isArray(message.modifications)) + return "modifications: array expected"; + for (var i = 0; i < message.modifications.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.verify(message.modifications[i]); + if (error) + return "modifications." + error; + } + } + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; - /** - * ResourceDescriptor history. - * @member {google.api.ResourceDescriptor.History} history - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.history = 0; + /** + * Creates a ModifyOrderRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest} ModifyOrderRequest + */ + ModifyOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.modifications) { + if (!Array.isArray(object.modifications)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.modifications: array expected"); + message.modifications = []; + for (var i = 0; i < object.modifications.length; ++i) { + if (typeof object.modifications[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.modifications: object expected"); + message.modifications[i] = $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.fromObject(object.modifications[i]); + } + } + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; - /** - * ResourceDescriptor plural. - * @member {string} plural - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.plural = ""; + /** + * Creates a plain object from a ModifyOrderRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest} message ModifyOrderRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModifyOrderRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.modifications = []; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.modifications && message.modifications.length) { + object.modifications = []; + for (var j = 0; j < message.modifications.length; ++j) + object.modifications[j] = $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.toObject(message.modifications[j], options); + } + return object; + }; - /** - * ResourceDescriptor singular. - * @member {string} singular - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.singular = ""; + /** + * Converts this ModifyOrderRequest to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @instance + * @returns {Object.} JSON object + */ + ModifyOrderRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * ResourceDescriptor style. - * @member {Array.} style - * @memberof google.api.ResourceDescriptor - * @instance - */ - ResourceDescriptor.prototype.style = $util.emptyArray; + /** + * Gets the default type url for ModifyOrderRequest + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModifyOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest"; + }; - /** - * 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); - }; + ModifyOrderRequest.Modification = (function() { - /** - * 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; - }; + /** + * Properties of a Modification. + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @interface IModification + * @property {string|null} [lineItemId] Modification lineItemId + * @property {google.cloud.commerce.consumer.procurement.v1.LineItemChangeType|null} [changeType] Modification changeType + * @property {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null} [newLineItemInfo] Modification newLineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior|null} [autoRenewalBehavior] Modification autoRenewalBehavior + */ - /** - * 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(); - }; + /** + * Constructs a new Modification. + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest + * @classdesc Represents a Modification. + * @implements IModification + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification=} [properties] Properties to set + */ + function Modification(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } - /** - * Decodes a ResourceDescriptor message from the specified reader or buffer. - * @function decode - * @memberof google.api.ResourceDescriptor - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.api.ResourceDescriptor} ResourceDescriptor - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - ResourceDescriptor.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.type = reader.string(); - break; - } - case 2: { - if (!(message.pattern && message.pattern.length)) - message.pattern = []; - message.pattern.push(reader.string()); - break; - } - case 3: { - message.nameField = reader.string(); - break; - } - case 4: { - message.history = reader.int32(); - break; - } - case 5: { - message.plural = reader.string(); - break; - } - case 6: { - message.singular = reader.string(); - break; - } - case 10: { - if (!(message.style && message.style.length)) - message.style = []; - if ((tag & 7) === 2) { - var end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) - message.style.push(reader.int32()); - } else - message.style.push(reader.int32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * Modification lineItemId. + * @member {string} lineItemId + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @instance + */ + Modification.prototype.lineItemId = ""; + + /** + * Modification changeType. + * @member {google.cloud.commerce.consumer.procurement.v1.LineItemChangeType} changeType + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @instance + */ + Modification.prototype.changeType = 0; + + /** + * Modification newLineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1.ILineItemInfo|null|undefined} newLineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @instance + */ + Modification.prototype.newLineItemInfo = null; + + /** + * Modification autoRenewalBehavior. + * @member {google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior} autoRenewalBehavior + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @instance + */ + Modification.prototype.autoRenewalBehavior = 0; + + /** + * Creates a new Modification instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification} Modification instance + */ + Modification.create = function create(properties) { + return new Modification(properties); + }; + + /** + * Encodes the specified Modification message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification} message Modification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Modification.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lineItemId != null && Object.hasOwnProperty.call(message, "lineItemId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lineItemId); + if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.changeType); + if (message.newLineItemInfo != null && Object.hasOwnProperty.call(message, "newLineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.encode(message.newLineItemInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.autoRenewalBehavior != null && Object.hasOwnProperty.call(message, "autoRenewalBehavior")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.autoRenewalBehavior); + return writer; + }; + + /** + * Encodes the specified Modification message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.IModification} message Modification message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Modification.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Modification message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification} Modification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Modification.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lineItemId = reader.string(); + break; + } + case 2: { + message.changeType = reader.int32(); + break; + } + case 3: { + message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.autoRenewalBehavior = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Modification message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification} Modification + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Modification.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Modification message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Modification.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) + if (!$util.isString(message.lineItemId)) + return "lineItemId: string expected"; + if (message.changeType != null && message.hasOwnProperty("changeType")) + switch (message.changeType) { + default: + return "changeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.verify(message.newLineItemInfo); + if (error) + return "newLineItemInfo." + error; + } + if (message.autoRenewalBehavior != null && message.hasOwnProperty("autoRenewalBehavior")) + switch (message.autoRenewalBehavior) { + default: + return "autoRenewalBehavior: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a Modification message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification} Modification + */ + Modification.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification(); + if (object.lineItemId != null) + message.lineItemId = String(object.lineItemId); + switch (object.changeType) { + default: + if (typeof object.changeType === "number") { + message.changeType = object.changeType; + break; + } + break; + case "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "LINE_ITEM_CHANGE_TYPE_CREATE": + case 1: + message.changeType = 1; + break; + case "LINE_ITEM_CHANGE_TYPE_UPDATE": + case 2: + message.changeType = 2; + break; + case "LINE_ITEM_CHANGE_TYPE_CANCEL": + case 3: + message.changeType = 3; + break; + case "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION": + case 4: + message.changeType = 4; + break; + } + if (object.newLineItemInfo != null) { + if (typeof object.newLineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification.newLineItemInfo: object expected"); + message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.fromObject(object.newLineItemInfo); + } + switch (object.autoRenewalBehavior) { + default: + if (typeof object.autoRenewalBehavior === "number") { + message.autoRenewalBehavior = object.autoRenewalBehavior; + break; + } + break; + case "AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED": + case 0: + message.autoRenewalBehavior = 0; + break; + case "AUTO_RENEWAL_BEHAVIOR_ENABLE": + case 1: + message.autoRenewalBehavior = 1; + break; + case "AUTO_RENEWAL_BEHAVIOR_DISABLE": + case 2: + message.autoRenewalBehavior = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a Modification message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification} message Modification + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Modification.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.lineItemId = ""; + object.changeType = options.enums === String ? "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED" : 0; + object.newLineItemInfo = null; + object.autoRenewalBehavior = options.enums === String ? "AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED" : 0; + } + if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) + object.lineItemId = message.lineItemId; + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeType[message.changeType] === undefined ? message.changeType : $root.google.cloud.commerce.consumer.procurement.v1.LineItemChangeType[message.changeType] : message.changeType; + if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) + object.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1.LineItemInfo.toObject(message.newLineItemInfo, options); + if (message.autoRenewalBehavior != null && message.hasOwnProperty("autoRenewalBehavior")) + object.autoRenewalBehavior = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior[message.autoRenewalBehavior] === undefined ? message.autoRenewalBehavior : $root.google.cloud.commerce.consumer.procurement.v1.AutoRenewalBehavior[message.autoRenewalBehavior] : message.autoRenewalBehavior; + return object; + }; + + /** + * Converts this Modification to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @instance + * @returns {Object.} JSON object + */ + Modification.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Modification + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Modification.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest.Modification"; + }; + + return Modification; + })(); + + return ModifyOrderRequest; + })(); + + v1.ModifyOrderMetadata = (function() { + + /** + * Properties of a ModifyOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface IModifyOrderMetadata + */ + + /** + * Constructs a new ModifyOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a ModifyOrderMetadata. + * @implements IModifyOrderMetadata + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata=} [properties] Properties to set + */ + function ModifyOrderMetadata(properties) { + if (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 ModifyOrderMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata} ModifyOrderMetadata instance + */ + ModifyOrderMetadata.create = function create(properties) { + return new ModifyOrderMetadata(properties); + }; + + /** + * Encodes the specified ModifyOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata} message ModifyOrderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyOrderMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified ModifyOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata} message ModifyOrderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ModifyOrderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ModifyOrderMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata} ModifyOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyOrderMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ModifyOrderMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata} ModifyOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ModifyOrderMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ModifyOrderMetadata message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ModifyOrderMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a ModifyOrderMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata} ModifyOrderMetadata + */ + ModifyOrderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata) + return object; + return new $root.google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata(); + }; + + /** + * Creates a plain object from a ModifyOrderMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata} message ModifyOrderMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ModifyOrderMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this ModifyOrderMetadata to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @instance + * @returns {Object.} JSON object + */ + ModifyOrderMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ModifyOrderMetadata + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ModifyOrderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata"; + }; + + return ModifyOrderMetadata; + })(); + + v1.CancelOrderRequest = (function() { + + /** + * Properties of a CancelOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface ICancelOrderRequest + * @property {string|null} [name] CancelOrderRequest name + * @property {string|null} [etag] CancelOrderRequest etag + * @property {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy|null} [cancellationPolicy] CancelOrderRequest cancellationPolicy + */ + + /** + * Constructs a new CancelOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a CancelOrderRequest. + * @implements ICancelOrderRequest + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest=} [properties] Properties to set + */ + function CancelOrderRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CancelOrderRequest name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @instance + */ + CancelOrderRequest.prototype.name = ""; + + /** + * CancelOrderRequest etag. + * @member {string} etag + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @instance + */ + CancelOrderRequest.prototype.etag = ""; + + /** + * CancelOrderRequest cancellationPolicy. + * @member {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy} cancellationPolicy + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @instance + */ + CancelOrderRequest.prototype.cancellationPolicy = 0; + + /** + * Creates a new CancelOrderRequest instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest} CancelOrderRequest instance + */ + CancelOrderRequest.create = function create(properties) { + return new CancelOrderRequest(properties); + }; + + /** + * Encodes the specified CancelOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest} message CancelOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOrderRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.etag); + if (message.cancellationPolicy != null && Object.hasOwnProperty.call(message, "cancellationPolicy")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.cancellationPolicy); + return writer; + }; + + /** + * Encodes the specified CancelOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest} message CancelOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOrderRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest} CancelOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOrderRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.etag = reader.string(); + break; + } + case 3: { + message.cancellationPolicy = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOrderRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest} CancelOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOrderRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOrderRequest message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOrderRequest.verify = function verify(message) { + if (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.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + if (message.cancellationPolicy != null && message.hasOwnProperty("cancellationPolicy")) + switch (message.cancellationPolicy) { + default: + return "cancellationPolicy: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a CancelOrderRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest} CancelOrderRequest + */ + CancelOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest(); + if (object.name != null) + message.name = String(object.name); + if (object.etag != null) + message.etag = String(object.etag); + switch (object.cancellationPolicy) { + default: + if (typeof object.cancellationPolicy === "number") { + message.cancellationPolicy = object.cancellationPolicy; + break; + } + break; + case "CANCELLATION_POLICY_UNSPECIFIED": + case 0: + message.cancellationPolicy = 0; + break; + case "CANCELLATION_POLICY_CANCEL_IMMEDIATELY": + case 1: + message.cancellationPolicy = 1; + break; + case "CANCELLATION_POLICY_CANCEL_AT_TERM_END": + case 2: + message.cancellationPolicy = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a CancelOrderRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest} message CancelOrderRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOrderRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.etag = ""; + object.cancellationPolicy = options.enums === String ? "CANCELLATION_POLICY_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + if (message.cancellationPolicy != null && message.hasOwnProperty("cancellationPolicy")) + object.cancellationPolicy = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy[message.cancellationPolicy] === undefined ? message.cancellationPolicy : $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy[message.cancellationPolicy] : message.cancellationPolicy; + return object; + }; + + /** + * Converts this CancelOrderRequest to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @instance + * @returns {Object.} JSON object + */ + CancelOrderRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOrderRequest + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest"; + }; + + /** + * CancellationPolicy enum. + * @name google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy + * @enum {number} + * @property {number} CANCELLATION_POLICY_UNSPECIFIED=0 CANCELLATION_POLICY_UNSPECIFIED value + * @property {number} CANCELLATION_POLICY_CANCEL_IMMEDIATELY=1 CANCELLATION_POLICY_CANCEL_IMMEDIATELY value + * @property {number} CANCELLATION_POLICY_CANCEL_AT_TERM_END=2 CANCELLATION_POLICY_CANCEL_AT_TERM_END value + */ + CancelOrderRequest.CancellationPolicy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "CANCELLATION_POLICY_UNSPECIFIED"] = 0; + values[valuesById[1] = "CANCELLATION_POLICY_CANCEL_IMMEDIATELY"] = 1; + values[valuesById[2] = "CANCELLATION_POLICY_CANCEL_AT_TERM_END"] = 2; + return values; + })(); + + return CancelOrderRequest; + })(); + + v1.CancelOrderMetadata = (function() { + + /** + * Properties of a CancelOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @interface ICancelOrderMetadata + */ + + /** + * Constructs a new CancelOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1 + * @classdesc Represents a CancelOrderMetadata. + * @implements ICancelOrderMetadata + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata=} [properties] Properties to set + */ + function CancelOrderMetadata(properties) { + if (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 CancelOrderMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata} CancelOrderMetadata instance + */ + CancelOrderMetadata.create = function create(properties) { + return new CancelOrderMetadata(properties); + }; + + /** + * Encodes the specified CancelOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata} message CancelOrderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOrderMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified CancelOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata} message CancelOrderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CancelOrderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CancelOrderMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata} CancelOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOrderMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CancelOrderMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata} CancelOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CancelOrderMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CancelOrderMetadata message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CancelOrderMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a CancelOrderMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata} CancelOrderMetadata + */ + CancelOrderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata) + return object; + return new $root.google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata(); + }; + + /** + * Creates a plain object from a CancelOrderMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata} message CancelOrderMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CancelOrderMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this CancelOrderMetadata to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @instance + * @returns {Object.} JSON object + */ + CancelOrderMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CancelOrderMetadata + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CancelOrderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata"; + }; + + return CancelOrderMetadata; + })(); + + return v1; + })(); + + procurement.v1alpha1 = (function() { + + /** + * Namespace v1alpha1. + * @memberof google.cloud.commerce.consumer.procurement + * @namespace + */ + var v1alpha1 = {}; + + /** + * LineItemChangeType enum. + * @name google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType + * @enum {number} + * @property {number} LINE_ITEM_CHANGE_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_TYPE_UNSPECIFIED value + * @property {number} LINE_ITEM_CHANGE_TYPE_CREATE=1 LINE_ITEM_CHANGE_TYPE_CREATE value + * @property {number} LINE_ITEM_CHANGE_TYPE_UPDATE=2 LINE_ITEM_CHANGE_TYPE_UPDATE value + * @property {number} LINE_ITEM_CHANGE_TYPE_CANCEL=3 LINE_ITEM_CHANGE_TYPE_CANCEL value + * @property {number} LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION=4 LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION value + */ + v1alpha1.LineItemChangeType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM_CHANGE_TYPE_CREATE"] = 1; + values[valuesById[2] = "LINE_ITEM_CHANGE_TYPE_UPDATE"] = 2; + values[valuesById[3] = "LINE_ITEM_CHANGE_TYPE_CANCEL"] = 3; + values[valuesById[4] = "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION"] = 4; + return values; + })(); + + /** + * LineItemChangeState enum. + * @name google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState + * @enum {number} + * @property {number} LINE_ITEM_CHANGE_STATE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_UNSPECIFIED value + * @property {number} LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL=1 LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL value + * @property {number} LINE_ITEM_CHANGE_STATE_APPROVED=2 LINE_ITEM_CHANGE_STATE_APPROVED value + * @property {number} LINE_ITEM_CHANGE_STATE_COMPLETED=3 LINE_ITEM_CHANGE_STATE_COMPLETED value + * @property {number} LINE_ITEM_CHANGE_STATE_REJECTED=4 LINE_ITEM_CHANGE_STATE_REJECTED value + * @property {number} LINE_ITEM_CHANGE_STATE_ABANDONED=5 LINE_ITEM_CHANGE_STATE_ABANDONED value + * @property {number} LINE_ITEM_CHANGE_STATE_ACTIVATING=6 LINE_ITEM_CHANGE_STATE_ACTIVATING value + */ + v1alpha1.LineItemChangeState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL"] = 1; + values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_APPROVED"] = 2; + values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_COMPLETED"] = 3; + values[valuesById[4] = "LINE_ITEM_CHANGE_STATE_REJECTED"] = 4; + values[valuesById[5] = "LINE_ITEM_CHANGE_STATE_ABANDONED"] = 5; + values[valuesById[6] = "LINE_ITEM_CHANGE_STATE_ACTIVATING"] = 6; + return values; + })(); + + /** + * LineItemChangeStateReasonType enum. + * @name google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType + * @enum {number} + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED=0 LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED value + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED=1 LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED value + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED=2 LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED value + * @property {number} LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED=3 LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED value + */ + v1alpha1.LineItemChangeStateReasonType = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED"] = 1; + values[valuesById[2] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED"] = 2; + values[valuesById[3] = "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED"] = 3; + return values; + })(); + + v1alpha1.Order = (function() { + + /** + * Properties of an Order. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IOrder + * @property {string|null} [name] Order name + * @property {string|null} [displayName] Order displayName + * @property {Array.|null} [lineItems] Order lineItems + * @property {Array.|null} [cancelledLineItems] Order cancelledLineItems + * @property {google.protobuf.ITimestamp|null} [createTime] Order createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] Order updateTime + * @property {string|null} [etag] Order etag + */ + + /** + * Constructs a new Order. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents an Order. + * @implements IOrder + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder=} [properties] Properties to set + */ + function Order(properties) { + this.lineItems = []; + this.cancelledLineItems = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Order name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.name = ""; + + /** + * Order displayName. + * @member {string} displayName + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.displayName = ""; + + /** + * Order lineItems. + * @member {Array.} lineItems + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.lineItems = $util.emptyArray; + + /** + * Order cancelledLineItems. + * @member {Array.} cancelledLineItems + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.cancelledLineItems = $util.emptyArray; + + /** + * Order createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.createTime = null; + + /** + * Order updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.updateTime = null; + + /** + * Order etag. + * @member {string} etag + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + */ + Order.prototype.etag = ""; + + /** + * Creates a new Order instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order instance + */ + Order.create = function create(properties) { + return new Order(properties); + }; + + /** + * Encodes the specified Order message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder} message Order message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Order.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.lineItems != null && message.lineItems.length) + for (var i = 0; i < message.lineItems.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.encode(message.lineItems[i], writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.cancelledLineItems != null && message.cancelledLineItems.length) + for (var i = 0; i < message.cancelledLineItems.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.encode(message.cancelledLineItems[i], writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.displayName); + if (message.etag != null && Object.hasOwnProperty.call(message, "etag")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etag); + return writer; + }; + + /** + * Encodes the specified Order message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IOrder} message Order message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Order.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Order message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Order.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 10: { + message.displayName = reader.string(); + break; + } + case 6: { + if (!(message.lineItems && message.lineItems.length)) + message.lineItems = []; + message.lineItems.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.cancelledLineItems && message.cancelledLineItems.length)) + message.cancelledLineItems = []; + message.cancelledLineItems.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.decode(reader, reader.uint32())); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 11: { + message.etag = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Order message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Order.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Order message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Order.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.lineItems != null && message.hasOwnProperty("lineItems")) { + if (!Array.isArray(message.lineItems)) + return "lineItems: array expected"; + for (var i = 0; i < message.lineItems.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify(message.lineItems[i]); + if (error) + return "lineItems." + error; + } + } + if (message.cancelledLineItems != null && message.hasOwnProperty("cancelledLineItems")) { + if (!Array.isArray(message.cancelledLineItems)) + return "cancelledLineItems: array expected"; + for (var i = 0; i < message.cancelledLineItems.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify(message.cancelledLineItems[i]); + if (error) + return "cancelledLineItems." + error; + } + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + if (message.etag != null && message.hasOwnProperty("etag")) + if (!$util.isString(message.etag)) + return "etag: string expected"; + return null; + }; + + /** + * Creates an Order message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Order} Order + */ + Order.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.lineItems) { + if (!Array.isArray(object.lineItems)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.lineItems: array expected"); + message.lineItems = []; + for (var i = 0; i < object.lineItems.length; ++i) { + if (typeof object.lineItems[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.lineItems: object expected"); + message.lineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.fromObject(object.lineItems[i]); + } + } + if (object.cancelledLineItems) { + if (!Array.isArray(object.cancelledLineItems)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.cancelledLineItems: array expected"); + message.cancelledLineItems = []; + for (var i = 0; i < object.cancelledLineItems.length; ++i) { + if (typeof object.cancelledLineItems[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.cancelledLineItems: object expected"); + message.cancelledLineItems[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.fromObject(object.cancelledLineItems[i]); + } + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Order.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + if (object.etag != null) + message.etag = String(object.etag); + return message; + }; + + /** + * Creates a plain object from an Order message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Order} message Order + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Order.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.lineItems = []; + object.cancelledLineItems = []; + } + if (options.defaults) { + object.name = ""; + object.createTime = null; + object.updateTime = null; + object.displayName = ""; + object.etag = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.lineItems && message.lineItems.length) { + object.lineItems = []; + for (var j = 0; j < message.lineItems.length; ++j) + object.lineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.toObject(message.lineItems[j], options); + } + if (message.cancelledLineItems && message.cancelledLineItems.length) { + object.cancelledLineItems = []; + for (var j = 0; j < message.cancelledLineItems.length; ++j) + object.cancelledLineItems[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.toObject(message.cancelledLineItems[j], options); + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.etag != null && message.hasOwnProperty("etag")) + object.etag = message.etag; + return object; + }; + + /** + * Converts this Order to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @instance + * @returns {Object.} JSON object + */ + Order.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Order + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Order + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Order.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Order"; + }; + + return Order; + })(); + + v1alpha1.LineItem = (function() { + + /** + * Properties of a LineItem. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface ILineItem + * @property {string|null} [lineItemId] LineItem lineItemId + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null} [lineItemInfo] LineItem lineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null} [pendingChange] LineItem pendingChange + * @property {Array.|null} [changeHistory] LineItem changeHistory + */ + + /** + * Constructs a new LineItem. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a LineItem. + * @implements ILineItem + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem=} [properties] Properties to set + */ + function LineItem(properties) { + this.changeHistory = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LineItem lineItemId. + * @member {string} lineItemId + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @instance + */ + LineItem.prototype.lineItemId = ""; + + /** + * LineItem lineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null|undefined} lineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @instance + */ + LineItem.prototype.lineItemInfo = null; + + /** + * LineItem pendingChange. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange|null|undefined} pendingChange + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @instance + */ + LineItem.prototype.pendingChange = null; + + /** + * LineItem changeHistory. + * @member {Array.} changeHistory + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @instance + */ + LineItem.prototype.changeHistory = $util.emptyArray; + + /** + * Creates a new LineItem instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem instance + */ + LineItem.create = function create(properties) { + return new LineItem(properties); + }; + + /** + * Encodes the specified LineItem message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem} message LineItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineItem.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.lineItemId != null && Object.hasOwnProperty.call(message, "lineItemId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.lineItemId); + if (message.lineItemInfo != null && Object.hasOwnProperty.call(message, "lineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.lineItemInfo, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.pendingChange != null && Object.hasOwnProperty.call(message, "pendingChange")) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.encode(message.pendingChange, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.changeHistory != null && message.changeHistory.length) + for (var i = 0; i < message.changeHistory.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.encode(message.changeHistory[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified LineItem message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItem} message LineItem message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineItem.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LineItem message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineItem.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.lineItemId = reader.string(); + break; + } + case 2: { + message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 3: { + message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.changeHistory && message.changeHistory.length)) + message.changeHistory = []; + message.changeHistory.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LineItem message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineItem.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LineItem message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LineItem.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) + if (!$util.isString(message.lineItemId)) + return "lineItemId: string expected"; + if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.lineItemInfo); + if (error) + return "lineItemInfo." + error; + } + if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify(message.pendingChange); + if (error) + return "pendingChange." + error; + } + if (message.changeHistory != null && message.hasOwnProperty("changeHistory")) { + if (!Array.isArray(message.changeHistory)) + return "changeHistory: array expected"; + for (var i = 0; i < message.changeHistory.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify(message.changeHistory[i]); + if (error) + return "changeHistory." + error; + } + } + return null; + }; + + /** + * Creates a LineItem message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} LineItem + */ + LineItem.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItem(); + if (object.lineItemId != null) + message.lineItemId = String(object.lineItemId); + if (object.lineItemInfo != null) { + if (typeof object.lineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.lineItemInfo: object expected"); + message.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.lineItemInfo); + } + if (object.pendingChange != null) { + if (typeof object.pendingChange !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.pendingChange: object expected"); + message.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.fromObject(object.pendingChange); + } + if (object.changeHistory) { + if (!Array.isArray(object.changeHistory)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.changeHistory: array expected"); + message.changeHistory = []; + for (var i = 0; i < object.changeHistory.length; ++i) { + if (typeof object.changeHistory[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItem.changeHistory: object expected"); + message.changeHistory[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.fromObject(object.changeHistory[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a LineItem message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.LineItem} message LineItem + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LineItem.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.changeHistory = []; + if (options.defaults) { + object.lineItemId = ""; + object.lineItemInfo = null; + object.pendingChange = null; + } + if (message.lineItemId != null && message.hasOwnProperty("lineItemId")) + object.lineItemId = message.lineItemId; + if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) + object.lineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.lineItemInfo, options); + if (message.pendingChange != null && message.hasOwnProperty("pendingChange")) + object.pendingChange = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.toObject(message.pendingChange, options); + if (message.changeHistory && message.changeHistory.length) { + object.changeHistory = []; + for (var j = 0; j < message.changeHistory.length; ++j) + object.changeHistory[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.toObject(message.changeHistory[j], options); + } + return object; + }; + + /** + * Converts this LineItem to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @instance + * @returns {Object.} JSON object + */ + LineItem.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LineItem + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItem + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LineItem.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.LineItem"; + }; + + return LineItem; + })(); + + v1alpha1.LineItemChange = (function() { + + /** + * Properties of a LineItemChange. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface ILineItemChange + * @property {string|null} [changeId] LineItemChange changeId + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType|null} [changeType] LineItemChange changeType + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null} [oldLineItemInfo] LineItemChange oldLineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null} [newLineItemInfo] LineItemChange newLineItemInfo + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState|null} [changeState] LineItemChange changeState + * @property {string|null} [stateReason] LineItemChange stateReason + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType|null} [changeStateReasonType] LineItemChange changeStateReasonType + * @property {google.protobuf.ITimestamp|null} [changeEffectiveTime] LineItemChange changeEffectiveTime + * @property {google.protobuf.ITimestamp|null} [createTime] LineItemChange createTime + * @property {google.protobuf.ITimestamp|null} [updateTime] LineItemChange updateTime + */ + + /** + * Constructs a new LineItemChange. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a LineItemChange. + * @implements ILineItemChange + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange=} [properties] Properties to set + */ + function LineItemChange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LineItemChange changeId. + * @member {string} changeId + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.changeId = ""; + + /** + * LineItemChange changeType. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType} changeType + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.changeType = 0; + + /** + * LineItemChange oldLineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null|undefined} oldLineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.oldLineItemInfo = null; + + /** + * LineItemChange newLineItemInfo. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo|null|undefined} newLineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.newLineItemInfo = null; + + /** + * LineItemChange changeState. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState} changeState + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.changeState = 0; + + /** + * LineItemChange stateReason. + * @member {string} stateReason + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.stateReason = ""; + + /** + * LineItemChange changeStateReasonType. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType} changeStateReasonType + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.changeStateReasonType = 0; + + /** + * LineItemChange changeEffectiveTime. + * @member {google.protobuf.ITimestamp|null|undefined} changeEffectiveTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.changeEffectiveTime = null; + + /** + * LineItemChange createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.createTime = null; + + /** + * LineItemChange updateTime. + * @member {google.protobuf.ITimestamp|null|undefined} updateTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + */ + LineItemChange.prototype.updateTime = null; + + /** + * Creates a new LineItemChange instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange instance + */ + LineItemChange.create = function create(properties) { + return new LineItemChange(properties); + }; + + /** + * Encodes the specified LineItemChange message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange} message LineItemChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineItemChange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.changeId != null && Object.hasOwnProperty.call(message, "changeId")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.changeId); + if (message.changeType != null && Object.hasOwnProperty.call(message, "changeType")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.changeType); + if (message.oldLineItemInfo != null && Object.hasOwnProperty.call(message, "oldLineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.oldLineItemInfo, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.newLineItemInfo != null && Object.hasOwnProperty.call(message, "newLineItemInfo")) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.newLineItemInfo, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.changeState != null && Object.hasOwnProperty.call(message, "changeState")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.changeState); + if (message.stateReason != null && Object.hasOwnProperty.call(message, "stateReason")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.stateReason); + if (message.changeEffectiveTime != null && Object.hasOwnProperty.call(message, "changeEffectiveTime")) + $root.google.protobuf.Timestamp.encode(message.changeEffectiveTime, writer.uint32(/* id 7, wireType 2 =*/58).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.updateTime != null && Object.hasOwnProperty.call(message, "updateTime")) + $root.google.protobuf.Timestamp.encode(message.updateTime, writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.changeStateReasonType != null && Object.hasOwnProperty.call(message, "changeStateReasonType")) + writer.uint32(/* id 10, wireType 0 =*/80).int32(message.changeStateReasonType); + return writer; + }; + + /** + * Encodes the specified LineItemChange message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemChange} message LineItemChange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineItemChange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LineItemChange message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineItemChange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.changeId = reader.string(); + break; + } + case 2: { + message.changeType = reader.int32(); + break; + } + case 3: { + message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 4: { + message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32()); + break; + } + case 5: { + message.changeState = reader.int32(); + break; + } + case 6: { + message.stateReason = reader.string(); + break; + } + case 10: { + message.changeStateReasonType = reader.int32(); + break; + } + case 7: { + message.changeEffectiveTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 8: { + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 9: { + message.updateTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LineItemChange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineItemChange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LineItemChange message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LineItemChange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.changeId != null && message.hasOwnProperty("changeId")) + if (!$util.isString(message.changeId)) + return "changeId: string expected"; + if (message.changeType != null && message.hasOwnProperty("changeType")) + switch (message.changeType) { + default: + return "changeType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + break; + } + if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.oldLineItemInfo); + if (error) + return "oldLineItemInfo." + error; + } + if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.newLineItemInfo); + if (error) + return "newLineItemInfo." + error; + } + if (message.changeState != null && message.hasOwnProperty("changeState")) + switch (message.changeState) { + default: + return "changeState: enum value expected"; + case 0: + case 1: + case 2: + case 3: + case 4: + case 5: + case 6: + break; + } + if (message.stateReason != null && message.hasOwnProperty("stateReason")) + if (!$util.isString(message.stateReason)) + return "stateReason: string expected"; + if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) + switch (message.changeStateReasonType) { + default: + return "changeStateReasonType: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.changeEffectiveTime); + if (error) + return "changeEffectiveTime." + error; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.updateTime != null && message.hasOwnProperty("updateTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.updateTime); + if (error) + return "updateTime." + error; + } + return null; + }; + + /** + * Creates a LineItemChange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} LineItemChange + */ + LineItemChange.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange(); + if (object.changeId != null) + message.changeId = String(object.changeId); + switch (object.changeType) { + default: + if (typeof object.changeType === "number") { + message.changeType = object.changeType; + break; + } + break; + case "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED": + case 0: + message.changeType = 0; + break; + case "LINE_ITEM_CHANGE_TYPE_CREATE": + case 1: + message.changeType = 1; + break; + case "LINE_ITEM_CHANGE_TYPE_UPDATE": + case 2: + message.changeType = 2; + break; + case "LINE_ITEM_CHANGE_TYPE_CANCEL": + case 3: + message.changeType = 3; + break; + case "LINE_ITEM_CHANGE_TYPE_REVERT_CANCELLATION": + case 4: + message.changeType = 4; + break; + } + if (object.oldLineItemInfo != null) { + if (typeof object.oldLineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.oldLineItemInfo: object expected"); + message.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.oldLineItemInfo); + } + if (object.newLineItemInfo != null) { + if (typeof object.newLineItemInfo !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.newLineItemInfo: object expected"); + message.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.newLineItemInfo); + } + switch (object.changeState) { + default: + if (typeof object.changeState === "number") { + message.changeState = object.changeState; + break; + } + break; + case "LINE_ITEM_CHANGE_STATE_UNSPECIFIED": + case 0: + message.changeState = 0; + break; + case "LINE_ITEM_CHANGE_STATE_PENDING_APPROVAL": + case 1: + message.changeState = 1; + break; + case "LINE_ITEM_CHANGE_STATE_APPROVED": + case 2: + message.changeState = 2; + break; + case "LINE_ITEM_CHANGE_STATE_COMPLETED": + case 3: + message.changeState = 3; + break; + case "LINE_ITEM_CHANGE_STATE_REJECTED": + case 4: + message.changeState = 4; + break; + case "LINE_ITEM_CHANGE_STATE_ABANDONED": + case 5: + message.changeState = 5; + break; + case "LINE_ITEM_CHANGE_STATE_ACTIVATING": + case 6: + message.changeState = 6; + break; + } + if (object.stateReason != null) + message.stateReason = String(object.stateReason); + switch (object.changeStateReasonType) { + default: + if (typeof object.changeStateReasonType === "number") { + message.changeStateReasonType = object.changeStateReasonType; + break; + } + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED": + case 0: + message.changeStateReasonType = 0; + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_EXPIRED": + case 1: + message.changeStateReasonType = 1; + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_USER_CANCELLED": + case 2: + message.changeStateReasonType = 2; + break; + case "LINE_ITEM_CHANGE_STATE_REASON_TYPE_SYSTEM_CANCELLED": + case 3: + message.changeStateReasonType = 3; + break; + } + if (object.changeEffectiveTime != null) { + if (typeof object.changeEffectiveTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.changeEffectiveTime: object expected"); + message.changeEffectiveTime = $root.google.protobuf.Timestamp.fromObject(object.changeEffectiveTime); + } + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.updateTime != null) { + if (typeof object.updateTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange.updateTime: object expected"); + message.updateTime = $root.google.protobuf.Timestamp.fromObject(object.updateTime); + } + return message; + }; + + /** + * Creates a plain object from a LineItemChange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange} message LineItemChange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LineItemChange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.changeId = ""; + object.changeType = options.enums === String ? "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED" : 0; + object.oldLineItemInfo = null; + object.newLineItemInfo = null; + object.changeState = options.enums === String ? "LINE_ITEM_CHANGE_STATE_UNSPECIFIED" : 0; + object.stateReason = ""; + object.changeEffectiveTime = null; + object.createTime = null; + object.updateTime = null; + object.changeStateReasonType = options.enums === String ? "LINE_ITEM_CHANGE_STATE_REASON_TYPE_UNSPECIFIED" : 0; + } + if (message.changeId != null && message.hasOwnProperty("changeId")) + object.changeId = message.changeId; + if (message.changeType != null && message.hasOwnProperty("changeType")) + object.changeType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType[message.changeType] === undefined ? message.changeType : $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeType[message.changeType] : message.changeType; + if (message.oldLineItemInfo != null && message.hasOwnProperty("oldLineItemInfo")) + object.oldLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.oldLineItemInfo, options); + if (message.newLineItemInfo != null && message.hasOwnProperty("newLineItemInfo")) + object.newLineItemInfo = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.newLineItemInfo, options); + if (message.changeState != null && message.hasOwnProperty("changeState")) + object.changeState = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState[message.changeState] === undefined ? message.changeState : $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeState[message.changeState] : message.changeState; + if (message.stateReason != null && message.hasOwnProperty("stateReason")) + object.stateReason = message.stateReason; + if (message.changeEffectiveTime != null && message.hasOwnProperty("changeEffectiveTime")) + object.changeEffectiveTime = $root.google.protobuf.Timestamp.toObject(message.changeEffectiveTime, options); + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.updateTime != null && message.hasOwnProperty("updateTime")) + object.updateTime = $root.google.protobuf.Timestamp.toObject(message.updateTime, options); + if (message.changeStateReasonType != null && message.hasOwnProperty("changeStateReasonType")) + object.changeStateReasonType = options.enums === String ? $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType[message.changeStateReasonType] === undefined ? message.changeStateReasonType : $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChangeStateReasonType[message.changeStateReasonType] : message.changeStateReasonType; + return object; + }; + + /** + * Converts this LineItemChange to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @instance + * @returns {Object.} JSON object + */ + LineItemChange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LineItemChange + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LineItemChange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.LineItemChange"; + }; + + return LineItemChange; + })(); + + v1alpha1.LineItemInfo = (function() { + + /** + * Properties of a LineItemInfo. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface ILineItemInfo + * @property {string|null} [offer] LineItemInfo offer + * @property {Array.|null} [parameters] LineItemInfo parameters + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null} [subscription] LineItemInfo subscription + */ + + /** + * Constructs a new LineItemInfo. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a LineItemInfo. + * @implements ILineItemInfo + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo=} [properties] Properties to set + */ + function LineItemInfo(properties) { + this.parameters = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * LineItemInfo offer. + * @member {string} offer + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @instance + */ + LineItemInfo.prototype.offer = ""; + + /** + * LineItemInfo parameters. + * @member {Array.} parameters + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @instance + */ + LineItemInfo.prototype.parameters = $util.emptyArray; + + /** + * LineItemInfo subscription. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription|null|undefined} subscription + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @instance + */ + LineItemInfo.prototype.subscription = null; + + /** + * Creates a new LineItemInfo instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo instance + */ + LineItemInfo.create = function create(properties) { + return new LineItemInfo(properties); + }; + + /** + * Encodes the specified LineItemInfo message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo} message LineItemInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineItemInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parameters != null && message.parameters.length) + for (var i = 0; i < message.parameters.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.encode(message.parameters[i], writer.uint32(/* id 9, wireType 2 =*/74).fork()).ldelim(); + if (message.subscription != null && Object.hasOwnProperty.call(message, "subscription")) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.encode(message.subscription, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + if (message.offer != null && Object.hasOwnProperty.call(message, "offer")) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.offer); + return writer; + }; + + /** + * Encodes the specified LineItemInfo message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ILineItemInfo} message LineItemInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + LineItemInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a LineItemInfo message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineItemInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 13: { + message.offer = reader.string(); + break; + } + case 9: { + if (!(message.parameters && message.parameters.length)) + message.parameters = []; + message.parameters.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.decode(reader, reader.uint32())); + break; + } + case 10: { + message.subscription = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a LineItemInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + LineItemInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a LineItemInfo message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + LineItemInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.offer != null && message.hasOwnProperty("offer")) + if (!$util.isString(message.offer)) + return "offer: string expected"; + if (message.parameters != null && message.hasOwnProperty("parameters")) { + if (!Array.isArray(message.parameters)) + return "parameters: array expected"; + for (var i = 0; i < message.parameters.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify(message.parameters[i]); + if (error) + return "parameters." + error; + } + } + if (message.subscription != null && message.hasOwnProperty("subscription")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify(message.subscription); + if (error) + return "subscription." + error; + } + return null; + }; + + /** + * Creates a LineItemInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} LineItemInfo + */ + LineItemInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo(); + if (object.offer != null) + message.offer = String(object.offer); + if (object.parameters) { + if (!Array.isArray(object.parameters)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.parameters: array expected"); + message.parameters = []; + for (var i = 0; i < object.parameters.length; ++i) { + if (typeof object.parameters[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.parameters: object expected"); + message.parameters[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.fromObject(object.parameters[i]); + } + } + if (object.subscription != null) { + if (typeof object.subscription !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.subscription: object expected"); + message.subscription = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.fromObject(object.subscription); + } + return message; + }; + + /** + * Creates a plain object from a LineItemInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo} message LineItemInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + LineItemInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.parameters = []; + if (options.defaults) { + object.subscription = null; + object.offer = ""; + } + if (message.parameters && message.parameters.length) { + object.parameters = []; + for (var j = 0; j < message.parameters.length; ++j) + object.parameters[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.toObject(message.parameters[j], options); + } + if (message.subscription != null && message.hasOwnProperty("subscription")) + object.subscription = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.toObject(message.subscription, options); + if (message.offer != null && message.hasOwnProperty("offer")) + object.offer = message.offer; + return object; + }; + + /** + * Converts this LineItemInfo to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @instance + * @returns {Object.} JSON object + */ + LineItemInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for LineItemInfo + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + LineItemInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo"; + }; + + return LineItemInfo; + })(); + + v1alpha1.Parameter = (function() { + + /** + * Properties of a Parameter. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IParameter + * @property {string|null} [name] Parameter name + * @property {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null} [value] Parameter value + */ + + /** + * Constructs a new Parameter. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a Parameter. + * @implements IParameter + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter=} [properties] Properties to set + */ + function Parameter(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Parameter name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @instance + */ + Parameter.prototype.name = ""; + + /** + * Parameter value. + * @member {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue|null|undefined} value + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @instance + */ + Parameter.prototype.value = null; + + /** + * Creates a new Parameter instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter instance + */ + Parameter.create = function create(properties) { + return new Parameter(properties); + }; + + /** + * Encodes the specified Parameter message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encode = function encode(message, writer) { + if (!writer) + 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 && Object.hasOwnProperty.call(message, "value")) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.encode(message.value, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Parameter message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IParameter} message Parameter message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Parameter.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Parameter message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.value = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Parameter message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Parameter.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Parameter message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Parameter.verify = function verify(message) { + if (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")) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify(message.value); + if (error) + return "value." + error; + } + return null; + }; + + /** + * Creates a Parameter message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} Parameter + */ + Parameter.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter(); + if (object.name != null) + message.name = String(object.name); + if (object.value != null) { + if (typeof object.value !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.value: object expected"); + message.value = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.fromObject(object.value); + } + return message; + }; + + /** + * Creates a plain object from a Parameter message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter} message Parameter + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Parameter.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.value = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value != null && message.hasOwnProperty("value")) + object.value = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.toObject(message.value, options); + return object; + }; + + /** + * Converts this Parameter to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @instance + * @returns {Object.} JSON object + */ + Parameter.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Parameter + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Parameter.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Parameter"; + }; + + Parameter.Value = (function() { + + /** + * Properties of a Value. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @interface IValue + * @property {number|Long|null} [int64Value] Value int64Value + * @property {string|null} [stringValue] Value stringValue + * @property {number|null} [doubleValue] Value doubleValue + */ + + /** + * Constructs a new Value. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter + * @classdesc Represents a Value. + * @implements IValue + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue=} [properties] Properties to set + */ + function Value(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Value int64Value. + * @member {number|Long|null|undefined} int64Value + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @instance + */ + Value.prototype.int64Value = null; + + /** + * Value stringValue. + * @member {string|null|undefined} stringValue + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @instance + */ + Value.prototype.stringValue = null; + + /** + * Value doubleValue. + * @member {number|null|undefined} doubleValue + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @instance + */ + Value.prototype.doubleValue = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * Value kind. + * @member {"int64Value"|"stringValue"|"doubleValue"|undefined} kind + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @instance + */ + Object.defineProperty(Value.prototype, "kind", { + get: $util.oneOfGetter($oneOfFields = ["int64Value", "stringValue", "doubleValue"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new Value instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value instance + */ + Value.create = function create(properties) { + return new Value(properties); + }; + + /** + * Encodes the specified Value message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.int64Value != null && Object.hasOwnProperty.call(message, "int64Value")) + writer.uint32(/* id 3, wireType 0 =*/24).int64(message.int64Value); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.stringValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 5, wireType 1 =*/41).double(message.doubleValue); + return writer; + }; + + /** + * Encodes the specified Value message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.IValue} message Value message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Value.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Value message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.int64Value = reader.int64(); + break; + } + case 4: { + message.stringValue = reader.string(); + break; + } + case 5: { + message.doubleValue = reader.double(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Value message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Value.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Value message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Value.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.int64Value != null && message.hasOwnProperty("int64Value")) { + properties.kind = 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.stringValue != null && message.hasOwnProperty("stringValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (!$util.isString(message.stringValue)) + return "stringValue: string expected"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + if (properties.kind === 1) + return "kind: multiple values"; + properties.kind = 1; + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + } + return null; + }; + + /** + * Creates a Value message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} Value + */ + Value.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value(); + 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.stringValue != null) + message.stringValue = String(object.stringValue); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + return message; + }; + + /** + * Creates a plain object from a Value message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value} message Value + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Value.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.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.kind = "int64Value"; + } + if (message.stringValue != null && message.hasOwnProperty("stringValue")) { + object.stringValue = message.stringValue; + if (options.oneofs) + object.kind = "stringValue"; + } + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) { + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (options.oneofs) + object.kind = "doubleValue"; + } + return object; + }; + + /** + * Converts this Value to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @instance + * @returns {Object.} JSON object + */ + Value.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Value + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Value.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Parameter.Value"; + }; + + return Value; + })(); + + return Parameter; + })(); + + v1alpha1.Subscription = (function() { + + /** + * Properties of a Subscription. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface ISubscription + * @property {google.protobuf.ITimestamp|null} [startTime] Subscription startTime + * @property {google.protobuf.ITimestamp|null} [endTime] Subscription endTime + * @property {boolean|null} [autoRenewalEnabled] Subscription autoRenewalEnabled + */ + + /** + * Constructs a new Subscription. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a Subscription. + * @implements ISubscription + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription=} [properties] Properties to set + */ + function Subscription(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Subscription startTime. + * @member {google.protobuf.ITimestamp|null|undefined} startTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @instance + */ + Subscription.prototype.startTime = null; + + /** + * Subscription endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @instance + */ + Subscription.prototype.endTime = null; + + /** + * Subscription autoRenewalEnabled. + * @member {boolean} autoRenewalEnabled + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @instance + */ + Subscription.prototype.autoRenewalEnabled = false; + + /** + * Creates a new Subscription instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription instance + */ + Subscription.create = function create(properties) { + return new Subscription(properties); + }; + + /** + * Encodes the specified Subscription message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription} message Subscription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subscription.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.autoRenewalEnabled != null && Object.hasOwnProperty.call(message, "autoRenewalEnabled")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.autoRenewalEnabled); + if (message.startTime != null && Object.hasOwnProperty.call(message, "startTime")) + $root.google.protobuf.Timestamp.encode(message.startTime, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified Subscription message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ISubscription} message Subscription message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Subscription.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Subscription message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subscription.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 3: { + message.startTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 1: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.autoRenewalEnabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Subscription message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Subscription.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Subscription message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Subscription.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.startTime != null && message.hasOwnProperty("startTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.startTime); + if (error) + return "startTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) + if (typeof message.autoRenewalEnabled !== "boolean") + return "autoRenewalEnabled: boolean expected"; + return null; + }; + + /** + * Creates a Subscription message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} Subscription + */ + Subscription.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.Subscription(); + if (object.startTime != null) { + if (typeof object.startTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.startTime: object expected"); + message.startTime = $root.google.protobuf.Timestamp.fromObject(object.startTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.Subscription.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.autoRenewalEnabled != null) + message.autoRenewalEnabled = Boolean(object.autoRenewalEnabled); + return message; + }; + + /** + * Creates a plain object from a Subscription message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Subscription} message Subscription + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Subscription.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.endTime = null; + object.autoRenewalEnabled = false; + object.startTime = null; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.autoRenewalEnabled != null && message.hasOwnProperty("autoRenewalEnabled")) + object.autoRenewalEnabled = message.autoRenewalEnabled; + if (message.startTime != null && message.hasOwnProperty("startTime")) + object.startTime = $root.google.protobuf.Timestamp.toObject(message.startTime, options); + return object; + }; + + /** + * Converts this Subscription to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @instance + * @returns {Object.} JSON object + */ + Subscription.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Subscription + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.Subscription + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Subscription.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.Subscription"; + }; + + return Subscription; + })(); + + v1alpha1.ConsumerProcurementService = (function() { + + /** + * Constructs a new ConsumerProcurementService service. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a ConsumerProcurementService + * @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 ConsumerProcurementService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (ConsumerProcurementService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = ConsumerProcurementService; + + /** + * Creates new ConsumerProcurementService service using the specified rpc implementation. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @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 {ConsumerProcurementService} RPC service. Useful where requests and/or responses are streamed. + */ + ConsumerProcurementService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|placeOrder}. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @typedef PlaceOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls PlaceOrder. + * @function placeOrder + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.PlaceOrderCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.placeOrder = function placeOrder(request, callback) { + return this.rpcCall(placeOrder, $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "PlaceOrder" }); + + /** + * Calls PlaceOrder. + * @function placeOrder + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} request PlaceOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|getOrder}. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @typedef GetOrderCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.Order} [response] Order + */ + + /** + * Calls GetOrder. + * @function getOrder + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} request GetOrderRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.GetOrderCallback} callback Node-style callback called with the error, if any, and Order + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.getOrder = function getOrder(request, callback) { + return this.rpcCall(getOrder, $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest, $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order, request, callback); + }, "name", { value: "GetOrder" }); + + /** + * Calls GetOrder. + * @function getOrder + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} request GetOrderRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService|listOrders}. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @typedef ListOrdersCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} [response] ListOrdersResponse + */ + + /** + * Calls ListOrders. + * @function listOrders + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} request ListOrdersRequest message or plain object + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService.ListOrdersCallback} callback Node-style callback called with the error, if any, and ListOrdersResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ConsumerProcurementService.prototype.listOrders = function listOrders(request, callback) { + return this.rpcCall(listOrders, $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest, $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse, request, callback); + }, "name", { value: "ListOrders" }); + + /** + * Calls ListOrders. + * @function listOrders + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ConsumerProcurementService + * @instance + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} request ListOrdersRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return ConsumerProcurementService; + })(); + + v1alpha1.PlaceOrderRequest = (function() { + + /** + * Properties of a PlaceOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IPlaceOrderRequest + * @property {string|null} [parent] PlaceOrderRequest parent + * @property {string|null} [displayName] PlaceOrderRequest displayName + * @property {Array.|null} [lineItemInfo] PlaceOrderRequest lineItemInfo + * @property {string|null} [requestId] PlaceOrderRequest requestId + */ + + /** + * Constructs a new PlaceOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a PlaceOrderRequest. + * @implements IPlaceOrderRequest + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest=} [properties] Properties to set + */ + function PlaceOrderRequest(properties) { + this.lineItemInfo = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * PlaceOrderRequest parent. + * @member {string} parent + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @instance + */ + PlaceOrderRequest.prototype.parent = ""; + + /** + * PlaceOrderRequest displayName. + * @member {string} displayName + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @instance + */ + PlaceOrderRequest.prototype.displayName = ""; + + /** + * PlaceOrderRequest lineItemInfo. + * @member {Array.} lineItemInfo + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @instance + */ + PlaceOrderRequest.prototype.lineItemInfo = $util.emptyArray; + + /** + * PlaceOrderRequest requestId. + * @member {string} requestId + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @instance + */ + PlaceOrderRequest.prototype.requestId = ""; + + /** + * Creates a new PlaceOrderRequest instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest instance + */ + PlaceOrderRequest.create = function create(properties) { + return new PlaceOrderRequest(properties); + }; + + /** + * Encodes the specified PlaceOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceOrderRequest.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.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.displayName); + if (message.requestId != null && Object.hasOwnProperty.call(message, "requestId")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.requestId); + if (message.lineItemInfo != null && message.lineItemInfo.length) + for (var i = 0; i < message.lineItemInfo.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.encode(message.lineItemInfo[i], writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified PlaceOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderRequest} message PlaceOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceOrderRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceOrderRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 6: { + message.displayName = reader.string(); + break; + } + case 10: { + if (!(message.lineItemInfo && message.lineItemInfo.length)) + message.lineItemInfo = []; + message.lineItemInfo.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.decode(reader, reader.uint32())); + break; + } + case 7: { + message.requestId = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceOrderRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceOrderRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceOrderRequest message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceOrderRequest.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.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.lineItemInfo != null && message.hasOwnProperty("lineItemInfo")) { + if (!Array.isArray(message.lineItemInfo)) + return "lineItemInfo: array expected"; + for (var i = 0; i < message.lineItemInfo.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.verify(message.lineItemInfo[i]); + if (error) + return "lineItemInfo." + error; + } + } + if (message.requestId != null && message.hasOwnProperty("requestId")) + if (!$util.isString(message.requestId)) + return "requestId: string expected"; + return null; + }; + + /** + * Creates a PlaceOrderRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} PlaceOrderRequest + */ + PlaceOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.displayName != null) + message.displayName = String(object.displayName); + if (object.lineItemInfo) { + if (!Array.isArray(object.lineItemInfo)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.lineItemInfo: array expected"); + message.lineItemInfo = []; + for (var i = 0; i < object.lineItemInfo.length; ++i) { + if (typeof object.lineItemInfo[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest.lineItemInfo: object expected"); + message.lineItemInfo[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.fromObject(object.lineItemInfo[i]); + } + } + if (object.requestId != null) + message.requestId = String(object.requestId); + return message; + }; + + /** + * Creates a plain object from a PlaceOrderRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest} message PlaceOrderRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceOrderRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.lineItemInfo = []; + if (options.defaults) { + object.parent = ""; + object.displayName = ""; + object.requestId = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.requestId != null && message.hasOwnProperty("requestId")) + object.requestId = message.requestId; + if (message.lineItemInfo && message.lineItemInfo.length) { + object.lineItemInfo = []; + for (var j = 0; j < message.lineItemInfo.length; ++j) + object.lineItemInfo[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.LineItemInfo.toObject(message.lineItemInfo[j], options); + } + return object; + }; + + /** + * Converts this PlaceOrderRequest to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @instance + * @returns {Object.} JSON object + */ + PlaceOrderRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceOrderRequest + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderRequest"; + }; + + return PlaceOrderRequest; + })(); + + v1alpha1.PlaceOrderMetadata = (function() { + + /** + * Properties of a PlaceOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IPlaceOrderMetadata + */ + + /** + * Constructs a new PlaceOrderMetadata. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a PlaceOrderMetadata. + * @implements IPlaceOrderMetadata + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata=} [properties] Properties to set + */ + function PlaceOrderMetadata(properties) { + if (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 PlaceOrderMetadata instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata instance + */ + PlaceOrderMetadata.create = function create(properties) { + return new PlaceOrderMetadata(properties); + }; + + /** + * Encodes the specified PlaceOrderMetadata message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceOrderMetadata.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified PlaceOrderMetadata message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IPlaceOrderMetadata} message PlaceOrderMetadata message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + PlaceOrderMetadata.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a PlaceOrderMetadata message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceOrderMetadata.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a PlaceOrderMetadata message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + PlaceOrderMetadata.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a PlaceOrderMetadata message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + PlaceOrderMetadata.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a PlaceOrderMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} PlaceOrderMetadata + */ + PlaceOrderMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata) + return object; + return new $root.google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata(); + }; + + /** + * Creates a plain object from a PlaceOrderMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata} message PlaceOrderMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + PlaceOrderMetadata.toObject = function toObject() { + return {}; + }; + + /** + * Converts this PlaceOrderMetadata to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @instance + * @returns {Object.} JSON object + */ + PlaceOrderMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for PlaceOrderMetadata + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + PlaceOrderMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.PlaceOrderMetadata"; + }; + + return PlaceOrderMetadata; + })(); + + v1alpha1.GetOrderRequest = (function() { + + /** + * Properties of a GetOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IGetOrderRequest + * @property {string|null} [name] GetOrderRequest name + */ + + /** + * Constructs a new GetOrderRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a GetOrderRequest. + * @implements IGetOrderRequest + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest=} [properties] Properties to set + */ + function GetOrderRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOrderRequest name. + * @member {string} name + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @instance + */ + GetOrderRequest.prototype.name = ""; + + /** + * Creates a new GetOrderRequest instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest instance + */ + GetOrderRequest.create = function create(properties) { + return new GetOrderRequest(properties); + }; + + /** + * Encodes the specified GetOrderRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOrderRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + return writer; + }; + + /** + * Encodes the specified GetOrderRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IGetOrderRequest} message GetOrderRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOrderRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOrderRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOrderRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOrderRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOrderRequest message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOrderRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + return null; + }; + + /** + * Creates a GetOrderRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} GetOrderRequest + */ + GetOrderRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOrderRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest} message GetOrderRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOrderRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + return object; + }; + + /** + * Converts this GetOrderRequest to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @instance + * @returns {Object.} JSON object + */ + GetOrderRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOrderRequest + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOrderRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.GetOrderRequest"; + }; + + return GetOrderRequest; + })(); + + v1alpha1.ListOrdersRequest = (function() { + + /** + * Properties of a ListOrdersRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IListOrdersRequest + * @property {string|null} [parent] ListOrdersRequest parent + * @property {number|null} [pageSize] ListOrdersRequest pageSize + * @property {string|null} [pageToken] ListOrdersRequest pageToken + * @property {string|null} [filter] ListOrdersRequest filter + */ + + /** + * Constructs a new ListOrdersRequest. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a ListOrdersRequest. + * @implements IListOrdersRequest + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest=} [properties] Properties to set + */ + function ListOrdersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOrdersRequest parent. + * @member {string} parent + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.parent = ""; + + /** + * ListOrdersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.pageSize = 0; + + /** + * ListOrdersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.pageToken = ""; + + /** + * ListOrdersRequest filter. + * @member {string} filter + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @instance + */ + ListOrdersRequest.prototype.filter = ""; + + /** + * Creates a new ListOrdersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest instance + */ + ListOrdersRequest.create = function create(properties) { + return new ListOrdersRequest(properties); + }; + + /** + * Encodes the specified ListOrdersRequest message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListOrdersRequest message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersRequest} message ListOrdersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOrdersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOrdersRequest message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOrdersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListOrdersRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} ListOrdersRequest + */ + ListOrdersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListOrdersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest} message ListOrdersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOrdersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListOrdersRequest to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @instance + * @returns {Object.} JSON object + */ + ListOrdersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOrdersRequest + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOrdersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersRequest"; + }; + + return ListOrdersRequest; + })(); + + v1alpha1.ListOrdersResponse = (function() { + + /** + * Properties of a ListOrdersResponse. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @interface IListOrdersResponse + * @property {Array.|null} [orders] ListOrdersResponse orders + * @property {string|null} [nextPageToken] ListOrdersResponse nextPageToken + */ + + /** + * Constructs a new ListOrdersResponse. + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1 + * @classdesc Represents a ListOrdersResponse. + * @implements IListOrdersResponse + * @constructor + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse=} [properties] Properties to set + */ + function ListOrdersResponse(properties) { + this.orders = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListOrdersResponse orders. + * @member {Array.} orders + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @instance + */ + ListOrdersResponse.prototype.orders = $util.emptyArray; + + /** + * ListOrdersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @instance + */ + ListOrdersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListOrdersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse=} [properties] Properties to set + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse instance + */ + ListOrdersResponse.create = function create(properties) { + return new ListOrdersResponse(properties); + }; + + /** + * Encodes the specified ListOrdersResponse message. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.orders != null && message.orders.length) + for (var i = 0; i < message.orders.length; ++i) + $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.encode(message.orders[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + return writer; + }; + + /** + * Encodes the specified ListOrdersResponse message, length delimited. Does not implicitly {@link google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.IListOrdersResponse} message ListOrdersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListOrdersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.orders && message.orders.length)) + message.orders = []; + message.orders.push($root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListOrdersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListOrdersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListOrdersResponse message. + * @function verify + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListOrdersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.orders != null && message.hasOwnProperty("orders")) { + if (!Array.isArray(message.orders)) + return "orders: array expected"; + for (var i = 0; i < message.orders.length; ++i) { + var error = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.verify(message.orders[i]); + if (error) + return "orders." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListOrdersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} ListOrdersResponse + */ + ListOrdersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse) + return object; + var message = new $root.google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse(); + if (object.orders) { + if (!Array.isArray(object.orders)) + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.orders: array expected"); + message.orders = []; + for (var i = 0; i < object.orders.length; ++i) { + if (typeof object.orders[i] !== "object") + throw TypeError(".google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse.orders: object expected"); + message.orders[i] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.fromObject(object.orders[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListOrdersResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse} message ListOrdersResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListOrdersResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.orders = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.orders && message.orders.length) { + object.orders = []; + for (var j = 0; j < message.orders.length; ++j) + object.orders[j] = $root.google.cloud.commerce.consumer.procurement.v1alpha1.Order.toObject(message.orders[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListOrdersResponse to JSON. + * @function toJSON + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @instance + * @returns {Object.} JSON object + */ + ListOrdersResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListOrdersResponse + * @function getTypeUrl + * @memberof google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListOrdersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.commerce.consumer.procurement.v1alpha1.ListOrdersResponse"; + }; + + return ListOrdersResponse; + })(); + + return v1alpha1; + })(); + + return procurement; + })(); + + return consumer; + })(); + + return commerce; + })(); + + return cloud; + })(); + + google.api = (function() { + + /** + * Namespace api. + * @memberof google + * @namespace + */ + var api = {}; + + api.Http = (function() { /** - * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.api.ResourceDescriptor + * 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 - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @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 */ - ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + Http.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; }; /** - * Verifies a ResourceDescriptor message. - * @function verify - * @memberof google.api.ResourceDescriptor + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @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 + * @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 */ - 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; + 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.plural != null && message.hasOwnProperty("plural")) - if (!$util.isString(message.plural)) - return "plural: string expected"; - if (message.singular != null && message.hasOwnProperty("singular")) - if (!$util.isString(message.singular)) - return "singular: string expected"; - if (message.style != null && message.hasOwnProperty("style")) { - if (!Array.isArray(message.style)) - return "style: array expected"; - for (var i = 0; i < message.style.length; ++i) - switch (message.style[i]) { - default: - return "style: enum value[] expected"; - case 0: - case 1: - break; - } } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; return null; }; /** - * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * Creates a Http message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @returns {google.api.Http} Http */ - ResourceDescriptor.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceDescriptor) + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) 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; + 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]); } - break; - case "HISTORY_UNSPECIFIED": - case 0: - message.history = 0; - break; - case "ORIGINALLY_SINGLE_PATTERN": - case 1: - message.history = 1; - break; - case "FUTURE_MULTI_PATTERN": - case 2: - message.history = 2; - break; - } - if (object.plural != null) - message.plural = String(object.plural); - if (object.singular != null) - message.singular = String(object.singular); - if (object.style) { - if (!Array.isArray(object.style)) - throw TypeError(".google.api.ResourceDescriptor.style: array expected"); - message.style = []; - for (var i = 0; i < object.style.length; ++i) - switch (object.style[i]) { - default: - if (typeof object.style[i] === "number") { - message.style[i] = object.style[i]; - break; - } - case "STYLE_UNSPECIFIED": - case 0: - message.style[i] = 0; - break; - case "DECLARATIVE_FRIENDLY": - case 1: - message.style[i] = 1; - break; - } } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); return message; }; /** - * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * Creates a plain object from a Http message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static - * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {google.api.Http} message Http * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceDescriptor.toObject = function toObject(message, options) { + Http.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]; + 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 ResourceDescriptor to JSON. + * Converts this Http to JSON. * @function toJSON - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @instance * @returns {Object.} JSON object */ - ResourceDescriptor.prototype.toJSON = function toJSON() { + Http.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceDescriptor + * Gets the default type url for Http * @function getTypeUrl - * @memberof google.api.ResourceDescriptor + * @memberof google.api.Http * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceDescriptor"; + 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; + /** - * 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 + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance */ - 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; - })(); + HttpRule.prototype.patch = null; /** - * 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 + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance */ - ResourceDescriptor.Style = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; - return values; - })(); - - return ResourceDescriptor; - })(); - - api.ResourceReference = (function() { + HttpRule.prototype.custom = null; /** - * Properties of a ResourceReference. - * @memberof google.api - * @interface IResourceReference - * @property {string|null} [type] ResourceReference type - * @property {string|null} [childType] ResourceReference childType + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance */ + HttpRule.prototype.body = ""; /** - * Constructs a new ResourceReference. - * @memberof google.api - * @classdesc Represents a ResourceReference. - * @implements IResourceReference - * @constructor - * @param {google.api.IResourceReference=} [properties] Properties to set + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance */ - function ResourceReference(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + HttpRule.prototype.responseBody = ""; /** - * ResourceReference type. - * @member {string} type - * @memberof google.api.ResourceReference + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.type = ""; + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * ResourceReference childType. - * @member {string} childType - * @memberof google.api.ResourceReference + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule * @instance */ - ResourceReference.prototype.childType = ""; + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new ResourceReference instance using the specified properties. + * Creates a new HttpRule instance using the specified properties. * @function create - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference=} [properties] Properties to set - * @returns {google.api.ResourceReference} ResourceReference instance + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance */ - ResourceReference.create = function create(properties) { - return new ResourceReference(properties); + HttpRule.create = function create(properties) { + return new HttpRule(properties); }; /** - * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encode - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encode = function encode(message, writer) { + HttpRule.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.type != null && Object.hasOwnProperty.call(message, "type")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); - if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + if (message.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 ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ResourceReference message from the specified reader or buffer. + * Decodes a HttpRule message from the specified reader or buffer. * @function decode - * @memberof google.api.ResourceReference + * @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.ResourceReference} ResourceReference + * @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 */ - ResourceReference.decode = function decode(reader, length) { + HttpRule.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.type = reader.string(); + message.selector = reader.string(); break; } case 2: { - message.childType = reader.string(); + 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: @@ -8105,137 +12516,259 @@ 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 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 ResourceReference message from a plain object. Also converts values to their respective internal types. + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {Object.} object Plain object - * @returns {google.api.ResourceReference} ResourceReference + * @returns {google.api.HttpRule} HttpRule */ - ResourceReference.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ResourceReference) + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) return object; - var message = new $root.google.api.ResourceReference(); - if (object.type != null) - message.type = String(object.type); - if (object.childType != null) - message.childType = String(object.childType); + var message = new $root.google.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 ResourceReference message. Also converts values to other types if specified. + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static - * @param {google.api.ResourceReference} message ResourceReference + * @param {google.api.HttpRule} message HttpRule * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ResourceReference.toObject = function toObject(message, options) { + HttpRule.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; if (options.defaults) { - object.type = ""; - object.childType = ""; + object.selector = ""; + object.body = ""; + object.responseBody = ""; } - if (message.type != null && message.hasOwnProperty("type")) - object.type = message.type; - if (message.childType != null && message.hasOwnProperty("childType")) - object.childType = message.childType; + 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 ResourceReference to JSON. + * Converts this HttpRule to JSON. * @function toJSON - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @instance * @returns {Object.} JSON object */ - ResourceReference.prototype.toJSON = function toJSON() { + HttpRule.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ResourceReference + * Gets the default type url for HttpRule * @function getTypeUrl - * @memberof google.api.ResourceReference + * @memberof google.api.HttpRule * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ResourceReference"; + return typeUrlPrefix + "/google.api.HttpRule"; }; - return ResourceReference; + return HttpRule; })(); - api.Http = (function() { + api.CustomHttpPattern = (function() { /** - * Properties of a Http. + * Properties of a CustomHttpPattern. * @memberof google.api - * @interface IHttp - * @property {Array.|null} [rules] Http rules - * @property {boolean|null} [fullyDecodeReservedExpansion] Http fullyDecodeReservedExpansion + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path */ /** - * Constructs a new Http. + * Constructs a new CustomHttpPattern. * @memberof google.api - * @classdesc Represents a Http. - * @implements IHttp + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern * @constructor - * @param {google.api.IHttp=} [properties] Properties to set + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set */ - function Http(properties) { - this.rules = []; + function CustomHttpPattern(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8243,92 +12776,89 @@ } /** - * Http rules. - * @member {Array.} rules - * @memberof google.api.Http + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.rules = $util.emptyArray; + CustomHttpPattern.prototype.kind = ""; /** - * Http fullyDecodeReservedExpansion. - * @member {boolean} fullyDecodeReservedExpansion - * @memberof google.api.Http + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern * @instance */ - Http.prototype.fullyDecodeReservedExpansion = false; + CustomHttpPattern.prototype.path = ""; /** - * Creates a new Http instance using the specified properties. + * Creates a new CustomHttpPattern instance using the specified properties. * @function create - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp=} [properties] Properties to set - * @returns {google.api.Http} Http instance + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance */ - Http.create = function create(properties) { - return new Http(properties); + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); }; /** - * Encodes the specified Http message. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encode - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encode = function encode(message, writer) { + CustomHttpPattern.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); + 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 Http message, length delimited. Does not implicitly {@link google.api.Http.verify|verify} messages. + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.IHttp} message Http message or plain object to encode + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Http.encodeDelimited = function encodeDelimited(message, writer) { + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Http message from the specified reader or buffer. + * Decodes a CustomHttpPattern message from the specified reader or buffer. * @function decode - * @memberof google.api.Http + * @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.Http} Http + * @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 */ - Http.decode = function decode(reader, length) { + CustomHttpPattern.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.rules && message.rules.length)) - message.rules = []; - message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + message.kind = reader.string(); break; } case 2: { - message.fullyDecodeReservedExpansion = reader.bool(); + message.path = reader.string(); break; } default: @@ -8340,158 +12870,133 @@ }; /** - * Decodes a Http message from the specified reader or buffer, length delimited. + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Http} Http + * @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 */ - Http.decodeDelimited = function decodeDelimited(reader) { + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Http message. + * Verifies a CustomHttpPattern message. * @function verify - * @memberof google.api.Http + * @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 */ - Http.verify = function verify(message) { + CustomHttpPattern.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"; + 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 Http message from a plain object. Also converts values to their respective internal types. + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {Object.} object Plain object - * @returns {google.api.Http} Http + * @returns {google.api.CustomHttpPattern} CustomHttpPattern */ - Http.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Http) + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) 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); + 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 Http message. Also converts values to other types if specified. + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static - * @param {google.api.Http} message Http + * @param {google.api.CustomHttpPattern} message CustomHttpPattern * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Http.toObject = function toObject(message, options) { + CustomHttpPattern.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 (options.defaults) { + object.kind = ""; + object.path = ""; } - if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) - object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + 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 Http to JSON. + * Converts this CustomHttpPattern to JSON. * @function toJSON - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @instance * @returns {Object.} JSON object */ - Http.prototype.toJSON = function toJSON() { + CustomHttpPattern.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Http + * Gets the default type url for CustomHttpPattern * @function getTypeUrl - * @memberof google.api.Http + * @memberof google.api.CustomHttpPattern * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Http"; + return typeUrlPrefix + "/google.api.CustomHttpPattern"; }; - return Http; + return CustomHttpPattern; })(); - api.HttpRule = (function() { + api.CommonLanguageSettings = (function() { /** - * Properties of a HttpRule. + * Properties of a CommonLanguageSettings. * @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 + * @interface ICommonLanguageSettings + * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri + * @property {Array.|null} [destinations] CommonLanguageSettings destinations */ /** - * Constructs a new HttpRule. + * Constructs a new CommonLanguageSettings. * @memberof google.api - * @classdesc Represents a HttpRule. - * @implements IHttpRule + * @classdesc Represents a CommonLanguageSettings. + * @implements ICommonLanguageSettings * @constructor - * @param {google.api.IHttpRule=} [properties] Properties to set + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set */ - function HttpRule(properties) { - this.additionalBindings = []; + function CommonLanguageSettings(properties) { + this.destinations = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8499,218 +13004,100 @@ } /** - * 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 + * CommonLanguageSettings referenceDocsUri. + * @member {string} referenceDocsUri + * @memberof google.api.CommonLanguageSettings * @instance */ - HttpRule.prototype.additionalBindings = $util.emptyArray; - - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + CommonLanguageSettings.prototype.referenceDocsUri = ""; /** - * HttpRule pattern. - * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern - * @memberof google.api.HttpRule + * CommonLanguageSettings destinations. + * @member {Array.} destinations + * @memberof google.api.CommonLanguageSettings * @instance */ - Object.defineProperty(HttpRule.prototype, "pattern", { - get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), - set: $util.oneOfSetter($oneOfFields) - }); + CommonLanguageSettings.prototype.destinations = $util.emptyArray; /** - * Creates a new HttpRule instance using the specified properties. + * Creates a new CommonLanguageSettings instance using the specified properties. * @function create - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IHttpRule=} [properties] Properties to set - * @returns {google.api.HttpRule} HttpRule instance + * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance */ - HttpRule.create = function create(properties) { - return new HttpRule(properties); + CommonLanguageSettings.create = function create(properties) { + return new CommonLanguageSettings(properties); }; /** - * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encode - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encode = function encode(message, writer) { + CommonLanguageSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); - if (message.get != null && Object.hasOwnProperty.call(message, "get")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); - if (message.put != null && Object.hasOwnProperty.call(message, "put")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); - if (message.post != null && Object.hasOwnProperty.call(message, "post")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); - if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) - writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); - if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) - writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); - if (message.body != null && Object.hasOwnProperty.call(message, "body")) - writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); - if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) - $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); - if (message.additionalBindings != null && message.additionalBindings.length) - for (var i = 0; i < message.additionalBindings.length; ++i) - $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); - if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) - writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + if (message.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 HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a HttpRule message from the specified reader or buffer. + * Decodes a CommonLanguageSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.HttpRule + * @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.HttpRule} HttpRule + * @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 */ - HttpRule.decode = function decode(reader, length) { + CommonLanguageSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.selector = reader.string(); + message.referenceDocsUri = 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())); + 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: @@ -8722,255 +13109,177 @@ }; /** - * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.HttpRule} HttpRule + * @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 */ - HttpRule.decodeDelimited = function decodeDelimited(reader) { + CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a HttpRule message. + * Verifies a CommonLanguageSettings message. * @function verify - * @memberof google.api.HttpRule + * @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 */ - HttpRule.verify = function verify(message) { + CommonLanguageSettings.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; - } + 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 HttpRule message from a plain object. Also converts values to their respective internal types. + * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static * @param {Object.} object Plain object - * @returns {google.api.HttpRule} HttpRule + * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings */ - HttpRule.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.HttpRule) + CommonLanguageSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CommonLanguageSettings) return object; - var message = new $root.google.api.HttpRule(); - if (object.selector != null) - message.selector = String(object.selector); - if (object.get != null) - message.get = String(object.get); - if (object.put != null) - message.put = String(object.put); - if (object.post != null) - message.post = String(object.post); - if (object["delete"] != null) - message["delete"] = String(object["delete"]); - if (object.patch != null) - message.patch = String(object.patch); - if (object.custom != null) { - if (typeof object.custom !== "object") - throw TypeError(".google.api.HttpRule.custom: object expected"); - message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); - } - if (object.body != null) - message.body = String(object.body); - if (object.responseBody != null) - message.responseBody = String(object.responseBody); - if (object.additionalBindings) { - if (!Array.isArray(object.additionalBindings)) - throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); - message.additionalBindings = []; - for (var i = 0; i < object.additionalBindings.length; ++i) { - if (typeof object.additionalBindings[i] !== "object") - throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); - message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); - } + var message = new $root.google.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 HttpRule message. Also converts values to other types if specified. + * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static - * @param {google.api.HttpRule} message HttpRule + * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - HttpRule.toObject = function toObject(message, options) { + CommonLanguageSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.arrays || options.defaults) - object.additionalBindings = []; - if (options.defaults) { - object.selector = ""; - object.body = ""; - object.responseBody = ""; - } - if (message.selector != null && message.hasOwnProperty("selector")) - object.selector = message.selector; - if (message.get != null && message.hasOwnProperty("get")) { - object.get = message.get; - if (options.oneofs) - object.pattern = "get"; - } - if (message.put != null && message.hasOwnProperty("put")) { - object.put = message.put; - if (options.oneofs) - object.pattern = "put"; - } - if (message.post != null && message.hasOwnProperty("post")) { - object.post = message.post; - if (options.oneofs) - object.pattern = "post"; - } - if (message["delete"] != null && message.hasOwnProperty("delete")) { - object["delete"] = message["delete"]; - if (options.oneofs) - object.pattern = "delete"; - } - if (message.patch != null && message.hasOwnProperty("patch")) { - object.patch = message.patch; - if (options.oneofs) - object.pattern = "patch"; - } - if (message.body != null && message.hasOwnProperty("body")) - object.body = message.body; - if (message.custom != null && message.hasOwnProperty("custom")) { - object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); - if (options.oneofs) - object.pattern = "custom"; - } - if (message.additionalBindings && message.additionalBindings.length) { - object.additionalBindings = []; - for (var j = 0; j < message.additionalBindings.length; ++j) - object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + object.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]; } - if (message.responseBody != null && message.hasOwnProperty("responseBody")) - object.responseBody = message.responseBody; return object; }; /** - * Converts this HttpRule to JSON. + * Converts this CommonLanguageSettings to JSON. * @function toJSON - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @instance * @returns {Object.} JSON object */ - HttpRule.prototype.toJSON = function toJSON() { + CommonLanguageSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for HttpRule + * Gets the default type url for CommonLanguageSettings * @function getTypeUrl - * @memberof google.api.HttpRule + * @memberof google.api.CommonLanguageSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.HttpRule"; + return typeUrlPrefix + "/google.api.CommonLanguageSettings"; }; - return HttpRule; + return CommonLanguageSettings; })(); - api.CustomHttpPattern = (function() { + api.ClientLibrarySettings = (function() { /** - * Properties of a CustomHttpPattern. + * Properties of a ClientLibrarySettings. * @memberof google.api - * @interface ICustomHttpPattern - * @property {string|null} [kind] CustomHttpPattern kind - * @property {string|null} [path] CustomHttpPattern path + * @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 CustomHttpPattern. + * Constructs a new ClientLibrarySettings. * @memberof google.api - * @classdesc Represents a CustomHttpPattern. - * @implements ICustomHttpPattern + * @classdesc Represents a ClientLibrarySettings. + * @implements IClientLibrarySettings * @constructor - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set */ - function CustomHttpPattern(properties) { + function ClientLibrarySettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -8978,89 +13287,215 @@ } /** - * CustomHttpPattern kind. - * @member {string} kind - * @memberof google.api.CustomHttpPattern + * ClientLibrarySettings version. + * @member {string} version + * @memberof google.api.ClientLibrarySettings * @instance */ - CustomHttpPattern.prototype.kind = ""; + ClientLibrarySettings.prototype.version = ""; /** - * CustomHttpPattern path. - * @member {string} path - * @memberof google.api.CustomHttpPattern + * ClientLibrarySettings launchStage. + * @member {google.api.LaunchStage} launchStage + * @memberof google.api.ClientLibrarySettings * @instance */ - CustomHttpPattern.prototype.path = ""; + ClientLibrarySettings.prototype.launchStage = 0; /** - * Creates a new CustomHttpPattern instance using the specified properties. + * 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.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.ICustomHttpPattern=} [properties] Properties to set - * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance */ - CustomHttpPattern.create = function create(properties) { - return new CustomHttpPattern(properties); + ClientLibrarySettings.create = function create(properties) { + return new ClientLibrarySettings(properties); }; /** - * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. * @function encode - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encode = function encode(message, writer) { + ClientLibrarySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); - if (message.path != null && Object.hasOwnProperty.call(message, "path")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + if (message.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 CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * Encodes the specified ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer. + * Decodes a ClientLibrarySettings message from the specified reader or buffer. * @function decode - * @memberof google.api.CustomHttpPattern + * @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.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decode = function decode(reader, length) { + ClientLibrarySettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.kind = reader.string(); + message.version = reader.string(); break; } case 2: { - message.path = reader.string(); + 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: @@ -9072,133 +13507,304 @@ }; /** - * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @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 */ - CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CustomHttpPattern message. + * Verifies a ClientLibrarySettings message. * @function verify - * @memberof google.api.CustomHttpPattern + * @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 */ - CustomHttpPattern.verify = function verify(message) { + ClientLibrarySettings.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"; + 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 CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static * @param {Object.} object Plain object - * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings */ - CustomHttpPattern.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CustomHttpPattern) + ClientLibrarySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ClientLibrarySettings) 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); + 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 CustomHttpPattern message. Also converts values to other types if specified. + * Creates a plain object from a ClientLibrarySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static - * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CustomHttpPattern.toObject = function toObject(message, options) { + ClientLibrarySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.kind = ""; - object.path = ""; + 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.kind != null && message.hasOwnProperty("kind")) - object.kind = message.kind; - if (message.path != null && message.hasOwnProperty("path")) - object.path = message.path; + 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 CustomHttpPattern to JSON. + * Converts this ClientLibrarySettings to JSON. * @function toJSON - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @instance * @returns {Object.} JSON object */ - CustomHttpPattern.prototype.toJSON = function toJSON() { + ClientLibrarySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CustomHttpPattern + * Gets the default type url for ClientLibrarySettings * @function getTypeUrl - * @memberof google.api.CustomHttpPattern + * @memberof google.api.ClientLibrarySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CustomHttpPattern"; + return typeUrlPrefix + "/google.api.ClientLibrarySettings"; }; - return CustomHttpPattern; + return ClientLibrarySettings; })(); - api.CommonLanguageSettings = (function() { + api.Publishing = (function() { /** - * Properties of a CommonLanguageSettings. + * Properties of a Publishing. * @memberof google.api - * @interface ICommonLanguageSettings - * @property {string|null} [referenceDocsUri] CommonLanguageSettings referenceDocsUri - * @property {Array.|null} [destinations] CommonLanguageSettings destinations + * @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 */ /** - * Constructs a new CommonLanguageSettings. + * Constructs a new Publishing. * @memberof google.api - * @classdesc Represents a CommonLanguageSettings. - * @implements ICommonLanguageSettings + * @classdesc Represents a Publishing. + * @implements IPublishing * @constructor - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set + * @param {google.api.IPublishing=} [properties] Properties to set */ - function CommonLanguageSettings(properties) { - this.destinations = []; + 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) @@ -9206,100 +13812,210 @@ } /** - * CommonLanguageSettings referenceDocsUri. - * @member {string} referenceDocsUri - * @memberof google.api.CommonLanguageSettings + * Publishing methodSettings. + * @member {Array.} methodSettings + * @memberof google.api.Publishing * @instance */ - CommonLanguageSettings.prototype.referenceDocsUri = ""; + Publishing.prototype.methodSettings = $util.emptyArray; /** - * CommonLanguageSettings destinations. - * @member {Array.} destinations - * @memberof google.api.CommonLanguageSettings + * Publishing newIssueUri. + * @member {string} newIssueUri + * @memberof google.api.Publishing * @instance */ - CommonLanguageSettings.prototype.destinations = $util.emptyArray; + Publishing.prototype.newIssueUri = ""; /** - * Creates a new CommonLanguageSettings instance using the specified properties. + * 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 = ""; + + /** + * Creates a new Publishing instance using the specified properties. * @function create - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static - * @param {google.api.ICommonLanguageSettings=} [properties] Properties to set - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings instance + * @param {google.api.IPublishing=} [properties] Properties to set + * @returns {google.api.Publishing} Publishing instance */ - CommonLanguageSettings.create = function create(properties) { - return new CommonLanguageSettings(properties); + Publishing.create = function create(properties) { + return new Publishing(properties); }; /** - * Encodes the specified CommonLanguageSettings message. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. * @function encode - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IPublishing} message Publishing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encode = function encode(message, writer) { + Publishing.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(); - } + 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); return writer; }; /** - * Encodes the specified CommonLanguageSettings message, length delimited. Does not implicitly {@link google.api.CommonLanguageSettings.verify|verify} messages. + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static - * @param {google.api.ICommonLanguageSettings} message CommonLanguageSettings message or plain object to encode + * @param {google.api.IPublishing} message Publishing message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CommonLanguageSettings.encodeDelimited = function encodeDelimited(message, writer) { + Publishing.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer. + * Decodes a Publishing message from the specified reader or buffer. * @function decode - * @memberof google.api.CommonLanguageSettings + * @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.CommonLanguageSettings} CommonLanguageSettings + * @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 */ - CommonLanguageSettings.decode = function decode(reader, length) { + Publishing.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CommonLanguageSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Publishing(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.referenceDocsUri = reader.string(); + case 2: { + if (!(message.methodSettings && message.methodSettings.length)) + message.methodSettings = []; + message.methodSettings.push($root.google.api.MethodSettings.decode(reader, reader.uint32())); 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()); + 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; } default: @@ -9311,177 +14027,295 @@ }; /** - * Decodes a CommonLanguageSettings message from the specified reader or buffer, length delimited. + * Decodes a Publishing message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @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 */ - CommonLanguageSettings.decodeDelimited = function decodeDelimited(reader) { + Publishing.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CommonLanguageSettings message. + * Verifies a Publishing message. * @function verify - * @memberof google.api.CommonLanguageSettings + * @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 */ - CommonLanguageSettings.verify = function verify(message) { + Publishing.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; - } + 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"; return null; }; /** - * Creates a CommonLanguageSettings message from a plain object. Also converts values to their respective internal types. + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static * @param {Object.} object Plain object - * @returns {google.api.CommonLanguageSettings} CommonLanguageSettings + * @returns {google.api.Publishing} Publishing */ - CommonLanguageSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CommonLanguageSettings) + Publishing.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Publishing) 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; - } + 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); return message; }; /** - * Creates a plain object from a CommonLanguageSettings message. Also converts values to other types if specified. + * Creates a plain object from a Publishing message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static - * @param {google.api.CommonLanguageSettings} message CommonLanguageSettings + * @param {google.api.Publishing} message Publishing * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CommonLanguageSettings.toObject = function toObject(message, options) { + Publishing.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]; + 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 = ""; + } + 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; return object; }; /** - * Converts this CommonLanguageSettings to JSON. + * Converts this Publishing to JSON. * @function toJSON - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @instance * @returns {Object.} JSON object */ - CommonLanguageSettings.prototype.toJSON = function toJSON() { + Publishing.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CommonLanguageSettings + * Gets the default type url for Publishing * @function getTypeUrl - * @memberof google.api.CommonLanguageSettings + * @memberof google.api.Publishing * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CommonLanguageSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CommonLanguageSettings"; + return typeUrlPrefix + "/google.api.Publishing"; }; - return CommonLanguageSettings; + return Publishing; })(); - api.ClientLibrarySettings = (function() { + api.JavaSettings = (function() { /** - * Properties of a ClientLibrarySettings. + * Properties of a JavaSettings. * @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 + * @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 ClientLibrarySettings. + * Constructs a new JavaSettings. * @memberof google.api - * @classdesc Represents a ClientLibrarySettings. - * @implements IClientLibrarySettings + * @classdesc Represents a JavaSettings. + * @implements IJavaSettings * @constructor - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set + * @param {google.api.IJavaSettings=} [properties] Properties to set */ - function ClientLibrarySettings(properties) { + function JavaSettings(properties) { + this.serviceClassNames = {}; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -9489,215 +14323,123 @@ } /** - * 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 + * JavaSettings libraryPackage. + * @member {string} libraryPackage + * @memberof google.api.JavaSettings * @instance */ - ClientLibrarySettings.prototype.dotnetSettings = null; + JavaSettings.prototype.libraryPackage = ""; /** - * ClientLibrarySettings rubySettings. - * @member {google.api.IRubySettings|null|undefined} rubySettings - * @memberof google.api.ClientLibrarySettings + * JavaSettings serviceClassNames. + * @member {Object.} serviceClassNames + * @memberof google.api.JavaSettings * @instance */ - ClientLibrarySettings.prototype.rubySettings = null; + JavaSettings.prototype.serviceClassNames = $util.emptyObject; /** - * ClientLibrarySettings goSettings. - * @member {google.api.IGoSettings|null|undefined} goSettings - * @memberof google.api.ClientLibrarySettings + * JavaSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.JavaSettings * @instance */ - ClientLibrarySettings.prototype.goSettings = null; + JavaSettings.prototype.common = null; /** - * Creates a new ClientLibrarySettings instance using the specified properties. + * Creates a new JavaSettings instance using the specified properties. * @function create - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.IClientLibrarySettings=} [properties] Properties to set - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings instance + * @param {google.api.IJavaSettings=} [properties] Properties to set + * @returns {google.api.JavaSettings} JavaSettings instance */ - ClientLibrarySettings.create = function create(properties) { - return new ClientLibrarySettings(properties); + JavaSettings.create = function create(properties) { + return new JavaSettings(properties); }; /** - * Encodes the specified ClientLibrarySettings message. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. * @function encode - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encode = function encode(message, writer) { + JavaSettings.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(); + 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 ClientLibrarySettings message, length delimited. Does not implicitly {@link google.api.ClientLibrarySettings.verify|verify} messages. + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.IClientLibrarySettings} message ClientLibrarySettings message or plain object to encode + * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ClientLibrarySettings.encodeDelimited = function encodeDelimited(message, writer) { + JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer. + * Decodes a JavaSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.ClientLibrarySettings + * @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.ClientLibrarySettings} ClientLibrarySettings + * @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 */ - ClientLibrarySettings.decode = function decode(reader, length) { + JavaSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ClientLibrarySettings(); + 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(); switch (tag >>> 3) { case 1: { - message.version = reader.string(); + message.libraryPackage = 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()); + 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 28: { - message.goSettings = $root.google.api.GoSettings.decode(reader, reader.uint32()); + case 3: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -9709,304 +14451,159 @@ }; /** - * Decodes a ClientLibrarySettings message from the specified reader or buffer, length delimited. + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @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 */ - ClientLibrarySettings.decodeDelimited = function decodeDelimited(reader) { + JavaSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ClientLibrarySettings message. + * Verifies a JavaSettings message. * @function verify - * @memberof google.api.ClientLibrarySettings + * @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 */ - ClientLibrarySettings.verify = function verify(message) { + JavaSettings.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.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.goSettings != null && message.hasOwnProperty("goSettings")) { - var error = $root.google.api.GoSettings.verify(message.goSettings); + if (message.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); if (error) - return "goSettings." + error; + return "common." + error; } return null; }; /** - * Creates a ClientLibrarySettings message from a plain object. Also converts values to their respective internal types. + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static * @param {Object.} object Plain object - * @returns {google.api.ClientLibrarySettings} ClientLibrarySettings + * @returns {google.api.JavaSettings} JavaSettings */ - ClientLibrarySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.ClientLibrarySettings) + JavaSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.JavaSettings) 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); + 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.goSettings != null) { - if (typeof object.goSettings !== "object") - throw TypeError(".google.api.ClientLibrarySettings.goSettings: object expected"); - message.goSettings = $root.google.api.GoSettings.fromObject(object.goSettings); + 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 ClientLibrarySettings message. Also converts values to other types if specified. + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static - * @param {google.api.ClientLibrarySettings} message ClientLibrarySettings + * @param {google.api.JavaSettings} message JavaSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ClientLibrarySettings.toObject = function toObject(message, options) { + JavaSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.objects || options.defaults) + object.serviceClassNames = {}; 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); + 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 ClientLibrarySettings to JSON. + * Converts this JavaSettings to JSON. * @function toJSON - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @instance * @returns {Object.} JSON object */ - ClientLibrarySettings.prototype.toJSON = function toJSON() { + JavaSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ClientLibrarySettings + * Gets the default type url for JavaSettings * @function getTypeUrl - * @memberof google.api.ClientLibrarySettings + * @memberof google.api.JavaSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ClientLibrarySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.ClientLibrarySettings"; + return typeUrlPrefix + "/google.api.JavaSettings"; }; - return ClientLibrarySettings; + return JavaSettings; })(); - api.Publishing = (function() { + api.CppSettings = (function() { /** - * Properties of a Publishing. + * Properties of a CppSettings. * @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 + * @interface ICppSettings + * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common */ /** - * Constructs a new Publishing. + * Constructs a new CppSettings. * @memberof google.api - * @classdesc Represents a Publishing. - * @implements IPublishing + * @classdesc Represents a CppSettings. + * @implements ICppSettings * @constructor - * @param {google.api.IPublishing=} [properties] Properties to set + * @param {google.api.ICppSettings=} [properties] Properties to set */ - function Publishing(properties) { - this.methodSettings = []; - this.codeownerGithubTeams = []; - this.librarySettings = []; + function CppSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10014,210 +14611,75 @@ } /** - * 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 + * CppSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.CppSettings * @instance */ - Publishing.prototype.protoReferenceDocumentationUri = ""; + CppSettings.prototype.common = null; /** - * Creates a new Publishing instance using the specified properties. + * Creates a new CppSettings instance using the specified properties. * @function create - * @memberof google.api.Publishing + * @memberof google.api.CppSettings * @static - * @param {google.api.IPublishing=} [properties] Properties to set - * @returns {google.api.Publishing} Publishing instance + * @param {google.api.ICppSettings=} [properties] Properties to set + * @returns {google.api.CppSettings} CppSettings instance */ - Publishing.create = function create(properties) { - return new Publishing(properties); + CppSettings.create = function create(properties) { + return new CppSettings(properties); }; /** - * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. * @function encode - * @memberof google.api.Publishing + * @memberof google.api.CppSettings * @static - * @param {google.api.IPublishing} message Publishing message or plain object to encode + * @param {google.api.ICppSettings} message CppSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Publishing.encode = function encode(message, writer) { + CppSettings.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.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 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) { - 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(); - 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(); + * 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) { + 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(); + switch (tag >>> 3) { + case 1: { + message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); break; } default: @@ -10229,295 +14691,127 @@ }; /** - * Decodes a Publishing message from the specified reader or buffer, length delimited. + * Decodes a CppSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.Publishing + * @memberof google.api.CppSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.Publishing} Publishing + * @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 */ - Publishing.decodeDelimited = function decodeDelimited(reader) { + CppSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Publishing message. + * Verifies a CppSettings message. * @function verify - * @memberof google.api.Publishing + * @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 */ - Publishing.verify = function verify(message) { + CppSettings.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.common != null && message.hasOwnProperty("common")) { + var error = $root.google.api.CommonLanguageSettings.verify(message.common); + if (error) + return "common." + error; } - if (message.protoReferenceDocumentationUri != null && message.hasOwnProperty("protoReferenceDocumentationUri")) - if (!$util.isString(message.protoReferenceDocumentationUri)) - return "protoReferenceDocumentationUri: string expected"; return null; }; /** - * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.Publishing + * @memberof google.api.CppSettings * @static * @param {Object.} object Plain object - * @returns {google.api.Publishing} Publishing + * @returns {google.api.CppSettings} CppSettings */ - Publishing.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.Publishing) + CppSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CppSettings) 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]); - } + 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); } - if (object.protoReferenceDocumentationUri != null) - message.protoReferenceDocumentationUri = String(object.protoReferenceDocumentationUri); 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 = ""; - } - 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; + * 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 Publishing to JSON. + * Converts this CppSettings to JSON. * @function toJSON - * @memberof google.api.Publishing + * @memberof google.api.CppSettings * @instance * @returns {Object.} JSON object */ - Publishing.prototype.toJSON = function toJSON() { + CppSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Publishing + * Gets the default type url for CppSettings * @function getTypeUrl - * @memberof google.api.Publishing + * @memberof google.api.CppSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Publishing.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.Publishing"; + return typeUrlPrefix + "/google.api.CppSettings"; }; - return Publishing; + return CppSettings; })(); - api.JavaSettings = (function() { + api.PhpSettings = (function() { /** - * Properties of a JavaSettings. + * Properties of a PhpSettings. * @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 + * @interface IPhpSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common */ /** - * Constructs a new JavaSettings. + * Constructs a new PhpSettings. * @memberof google.api - * @classdesc Represents a JavaSettings. - * @implements IJavaSettings + * @classdesc Represents a PhpSettings. + * @implements IPhpSettings * @constructor - * @param {google.api.IJavaSettings=} [properties] Properties to set + * @param {google.api.IPhpSettings=} [properties] Properties to set */ - function JavaSettings(properties) { - this.serviceClassNames = {}; + function PhpSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10525,122 +14819,74 @@ } /** - * 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. + * PhpSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @instance */ - JavaSettings.prototype.common = null; + PhpSettings.prototype.common = null; /** - * Creates a new JavaSettings instance using the specified properties. + * Creates a new PhpSettings instance using the specified properties. * @function create - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.IJavaSettings=} [properties] Properties to set - * @returns {google.api.JavaSettings} JavaSettings instance + * @param {google.api.IPhpSettings=} [properties] Properties to set + * @returns {google.api.PhpSettings} PhpSettings instance */ - JavaSettings.create = function create(properties) { - return new JavaSettings(properties); + PhpSettings.create = function create(properties) { + return new PhpSettings(properties); }; /** - * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. * @function encode - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encode = function encode(message, writer) { + PhpSettings.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(); + $root.google.api.CommonLanguageSettings.encode(message.common, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.IJavaSettings} message JavaSettings message or plain object to encode + * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - JavaSettings.encodeDelimited = function encodeDelimited(message, writer) { + PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a JavaSettings message from the specified reader or buffer. + * Decodes a PhpSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.JavaSettings + * @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.JavaSettings} JavaSettings + * @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 */ - JavaSettings.decode = function decode(reader, length) { + PhpSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.JavaSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); while (reader.pos < end) { var tag = reader.uint32(); 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; } @@ -10653,43 +14899,32 @@ }; /** - * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.JavaSettings} JavaSettings + * @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 */ - JavaSettings.decodeDelimited = function decodeDelimited(reader) { + PhpSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a JavaSettings message. + * Verifies a PhpSettings message. * @function verify - * @memberof google.api.JavaSettings + * @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 */ - JavaSettings.verify = function verify(message) { + PhpSettings.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) @@ -10699,113 +14934,92 @@ }; /** - * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static * @param {Object.} object Plain object - * @returns {google.api.JavaSettings} JavaSettings + * @returns {google.api.PhpSettings} PhpSettings */ - JavaSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.JavaSettings) + PhpSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PhpSettings) 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]]); - } + var message = new $root.google.api.PhpSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.JavaSettings.common: object expected"); + 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 JavaSettings message. Also converts values to other types if specified. + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static - * @param {google.api.JavaSettings} message JavaSettings + * @param {google.api.PhpSettings} message PhpSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - JavaSettings.toObject = function toObject(message, options) { + PhpSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.objects || options.defaults) - object.serviceClassNames = {}; - if (options.defaults) { - object.libraryPackage = ""; + if (options.defaults) 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. + * Converts this PhpSettings to JSON. * @function toJSON - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @instance * @returns {Object.} JSON object */ - JavaSettings.prototype.toJSON = function toJSON() { + PhpSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for JavaSettings + * Gets the default type url for PhpSettings * @function getTypeUrl - * @memberof google.api.JavaSettings + * @memberof google.api.PhpSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - JavaSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.JavaSettings"; + return typeUrlPrefix + "/google.api.PhpSettings"; }; - return JavaSettings; + return PhpSettings; })(); - api.CppSettings = (function() { + api.PythonSettings = (function() { /** - * Properties of a CppSettings. + * Properties of a PythonSettings. * @memberof google.api - * @interface ICppSettings - * @property {google.api.ICommonLanguageSettings|null} [common] CppSettings common + * @interface IPythonSettings + * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common */ /** - * Constructs a new CppSettings. + * Constructs a new PythonSettings. * @memberof google.api - * @classdesc Represents a CppSettings. - * @implements ICppSettings + * @classdesc Represents a PythonSettings. + * @implements IPythonSettings * @constructor - * @param {google.api.ICppSettings=} [properties] Properties to set + * @param {google.api.IPythonSettings=} [properties] Properties to set */ - function CppSettings(properties) { + function PythonSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -10813,35 +15027,35 @@ } /** - * CppSettings common. + * PythonSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @instance */ - CppSettings.prototype.common = null; + PythonSettings.prototype.common = null; /** - * Creates a new CppSettings instance using the specified properties. + * Creates a new PythonSettings instance using the specified properties. * @function create - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.ICppSettings=} [properties] Properties to set - * @returns {google.api.CppSettings} CppSettings instance + * @param {google.api.IPythonSettings=} [properties] Properties to set + * @returns {google.api.PythonSettings} PythonSettings instance */ - CppSettings.create = function create(properties) { - return new CppSettings(properties); + PythonSettings.create = function create(properties) { + return new PythonSettings(properties); }; /** - * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. * @function encode - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encode = function encode(message, writer) { + PythonSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) @@ -10850,33 +15064,33 @@ }; /** - * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.ICppSettings} message CppSettings message or plain object to encode + * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CppSettings.encodeDelimited = function encodeDelimited(message, writer) { + PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CppSettings message from the specified reader or buffer. + * Decodes a PythonSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.CppSettings + * @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.CppSettings} CppSettings + * @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 */ - CppSettings.decode = function decode(reader, length) { + PythonSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CppSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -10893,30 +15107,30 @@ }; /** - * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.CppSettings} CppSettings + * @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 */ - CppSettings.decodeDelimited = function decodeDelimited(reader) { + PythonSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CppSettings message. + * Verifies a PythonSettings message. * @function verify - * @memberof google.api.CppSettings + * @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 */ - CppSettings.verify = function verify(message) { + PythonSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -10928,35 +15142,35 @@ }; /** - * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static * @param {Object.} object Plain object - * @returns {google.api.CppSettings} CppSettings + * @returns {google.api.PythonSettings} PythonSettings */ - CppSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.CppSettings) + PythonSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.PythonSettings) return object; - var message = new $root.google.api.CppSettings(); + var message = new $root.google.api.PythonSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.CppSettings.common: object expected"); + 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 CppSettings message. Also converts values to other types if specified. + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static - * @param {google.api.CppSettings} message CppSettings + * @param {google.api.PythonSettings} message PythonSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CppSettings.toObject = function toObject(message, options) { + PythonSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -10968,52 +15182,52 @@ }; /** - * Converts this CppSettings to JSON. + * Converts this PythonSettings to JSON. * @function toJSON - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @instance * @returns {Object.} JSON object */ - CppSettings.prototype.toJSON = function toJSON() { + PythonSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CppSettings + * Gets the default type url for PythonSettings * @function getTypeUrl - * @memberof google.api.CppSettings + * @memberof google.api.PythonSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CppSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.CppSettings"; + return typeUrlPrefix + "/google.api.PythonSettings"; }; - return CppSettings; + return PythonSettings; })(); - api.PhpSettings = (function() { + api.NodeSettings = (function() { /** - * Properties of a PhpSettings. + * Properties of a NodeSettings. * @memberof google.api - * @interface IPhpSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PhpSettings common + * @interface INodeSettings + * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common */ /** - * Constructs a new PhpSettings. + * Constructs a new NodeSettings. * @memberof google.api - * @classdesc Represents a PhpSettings. - * @implements IPhpSettings + * @classdesc Represents a NodeSettings. + * @implements INodeSettings * @constructor - * @param {google.api.IPhpSettings=} [properties] Properties to set + * @param {google.api.INodeSettings=} [properties] Properties to set */ - function PhpSettings(properties) { + function NodeSettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11021,35 +15235,35 @@ } /** - * PhpSettings common. + * NodeSettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @instance */ - PhpSettings.prototype.common = null; + NodeSettings.prototype.common = null; /** - * Creates a new PhpSettings instance using the specified properties. + * Creates a new NodeSettings instance using the specified properties. * @function create - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.IPhpSettings=} [properties] Properties to set - * @returns {google.api.PhpSettings} PhpSettings instance + * @param {google.api.INodeSettings=} [properties] Properties to set + * @returns {google.api.NodeSettings} NodeSettings instance */ - PhpSettings.create = function create(properties) { - return new PhpSettings(properties); + NodeSettings.create = function create(properties) { + return new NodeSettings(properties); }; /** - * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. * @function encode - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encode = function encode(message, writer) { + NodeSettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) @@ -11058,33 +15272,33 @@ }; /** - * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.IPhpSettings} message PhpSettings message or plain object to encode + * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PhpSettings.encodeDelimited = function encodeDelimited(message, writer) { + NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PhpSettings message from the specified reader or buffer. + * Decodes a NodeSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.PhpSettings + * @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.PhpSettings} PhpSettings + * @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 */ - PhpSettings.decode = function decode(reader, length) { + NodeSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PhpSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11101,30 +15315,30 @@ }; /** - * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PhpSettings} PhpSettings + * @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 */ - PhpSettings.decodeDelimited = function decodeDelimited(reader) { + NodeSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PhpSettings message. + * Verifies a NodeSettings message. * @function verify - * @memberof google.api.PhpSettings + * @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 */ - PhpSettings.verify = function verify(message) { + NodeSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -11136,35 +15350,35 @@ }; /** - * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static * @param {Object.} object Plain object - * @returns {google.api.PhpSettings} PhpSettings + * @returns {google.api.NodeSettings} NodeSettings */ - PhpSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.PhpSettings) + NodeSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.NodeSettings) return object; - var message = new $root.google.api.PhpSettings(); + var message = new $root.google.api.NodeSettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.PhpSettings.common: object expected"); + 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 PhpSettings message. Also converts values to other types if specified. + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static - * @param {google.api.PhpSettings} message PhpSettings + * @param {google.api.NodeSettings} message NodeSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PhpSettings.toObject = function toObject(message, options) { + NodeSettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -11176,123 +15390,188 @@ }; /** - * Converts this PhpSettings to JSON. + * Converts this NodeSettings to JSON. * @function toJSON - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @instance * @returns {Object.} JSON object */ - PhpSettings.prototype.toJSON = function toJSON() { + NodeSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PhpSettings + * Gets the default type url for NodeSettings * @function getTypeUrl - * @memberof google.api.PhpSettings + * @memberof google.api.NodeSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PhpSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.PhpSettings"; + return typeUrlPrefix + "/google.api.NodeSettings"; }; - return PhpSettings; + return NodeSettings; })(); - api.PythonSettings = (function() { + 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; /** - * Properties of a PythonSettings. - * @memberof google.api - * @interface IPythonSettings - * @property {google.api.ICommonLanguageSettings|null} [common] PythonSettings common + * DotnetSettings ignoredResources. + * @member {Array.} ignoredResources + * @memberof google.api.DotnetSettings + * @instance */ + DotnetSettings.prototype.ignoredResources = $util.emptyArray; /** - * Constructs a new PythonSettings. - * @memberof google.api - * @classdesc Represents a PythonSettings. - * @implements IPythonSettings - * @constructor - * @param {google.api.IPythonSettings=} [properties] Properties to set + * DotnetSettings forcedNamespaceAliases. + * @member {Array.} forcedNamespaceAliases + * @memberof google.api.DotnetSettings + * @instance */ - 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]]; - } + DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; /** - * PythonSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.PythonSettings + * DotnetSettings handwrittenSignatures. + * @member {Array.} handwrittenSignatures + * @memberof google.api.DotnetSettings * @instance */ - PythonSettings.prototype.common = null; + DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; /** - * Creates a new PythonSettings instance using the specified properties. + * Creates a new DotnetSettings instance using the specified properties. * @function create - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.IPythonSettings=} [properties] Properties to set - * @returns {google.api.PythonSettings} PythonSettings instance + * @param {google.api.IDotnetSettings=} [properties] Properties to set + * @returns {google.api.DotnetSettings} DotnetSettings instance */ - PythonSettings.create = function create(properties) { - return new PythonSettings(properties); + DotnetSettings.create = function create(properties) { + return new DotnetSettings(properties); }; /** - * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. * @function encode - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encode = function encode(message, 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 PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.IPythonSettings} message PythonSettings message or plain object to encode + * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - PythonSettings.encodeDelimited = function encodeDelimited(message, writer) { + DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a PythonSettings message from the specified reader or buffer. + * Decodes a DotnetSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.PythonSettings + * @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.PythonSettings} PythonSettings + * @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 */ - PythonSettings.decode = function decode(reader, length) { + DotnetSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.PythonSettings(); + 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(); switch (tag >>> 3) { @@ -11300,6 +15579,70 @@ 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; @@ -11309,30 +15652,30 @@ }; /** - * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.PythonSettings} PythonSettings + * @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 */ - PythonSettings.decodeDelimited = function decodeDelimited(reader) { + DotnetSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a PythonSettings message. + * Verifies a DotnetSettings message. * @function verify - * @memberof google.api.PythonSettings + * @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 */ - PythonSettings.verify = function verify(message) { + DotnetSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -11340,96 +15683,203 @@ 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); + 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 PythonSettings message. Also converts values to other types if specified. + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @static - * @param {google.api.PythonSettings} message PythonSettings + * @param {google.api.DotnetSettings} message DotnetSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - PythonSettings.toObject = function toObject(message, options) { + 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 PythonSettings to JSON. + * Converts this DotnetSettings to JSON. * @function toJSON - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @instance * @returns {Object.} JSON object */ - PythonSettings.prototype.toJSON = function toJSON() { + DotnetSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for PythonSettings + * Gets the default type url for DotnetSettings * @function getTypeUrl - * @memberof google.api.PythonSettings + * @memberof google.api.DotnetSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - PythonSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.PythonSettings"; + return typeUrlPrefix + "/google.api.DotnetSettings"; }; - return PythonSettings; + return DotnetSettings; })(); - api.NodeSettings = (function() { + api.RubySettings = (function() { /** - * Properties of a NodeSettings. + * Properties of a RubySettings. * @memberof google.api - * @interface INodeSettings - * @property {google.api.ICommonLanguageSettings|null} [common] NodeSettings common + * @interface IRubySettings + * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common */ /** - * Constructs a new NodeSettings. + * Constructs a new RubySettings. * @memberof google.api - * @classdesc Represents a NodeSettings. - * @implements INodeSettings + * @classdesc Represents a RubySettings. + * @implements IRubySettings * @constructor - * @param {google.api.INodeSettings=} [properties] Properties to set + * @param {google.api.IRubySettings=} [properties] Properties to set */ - function NodeSettings(properties) { + function RubySettings(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -11437,35 +15887,35 @@ } /** - * NodeSettings common. + * RubySettings common. * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @instance */ - NodeSettings.prototype.common = null; + RubySettings.prototype.common = null; /** - * Creates a new NodeSettings instance using the specified properties. + * Creates a new RubySettings instance using the specified properties. * @function create - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static - * @param {google.api.INodeSettings=} [properties] Properties to set - * @returns {google.api.NodeSettings} NodeSettings instance + * @param {google.api.IRubySettings=} [properties] Properties to set + * @returns {google.api.RubySettings} RubySettings instance */ - NodeSettings.create = function create(properties) { - return new NodeSettings(properties); + RubySettings.create = function create(properties) { + return new RubySettings(properties); }; /** - * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. * @function encode - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encode = function encode(message, writer) { + RubySettings.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.common != null && Object.hasOwnProperty.call(message, "common")) @@ -11474,33 +15924,33 @@ }; /** - * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static - * @param {google.api.INodeSettings} message NodeSettings message or plain object to encode + * @param {google.api.IRubySettings} message RubySettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodeSettings.encodeDelimited = function encodeDelimited(message, writer) { + RubySettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodeSettings message from the specified reader or buffer. + * Decodes a RubySettings message from the specified reader or buffer. * @function decode - * @memberof google.api.NodeSettings + * @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.NodeSettings} NodeSettings + * @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 */ - NodeSettings.decode = function decode(reader, length) { + RubySettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.NodeSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11517,30 +15967,30 @@ }; /** - * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * Decodes a RubySettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.NodeSettings} NodeSettings + * @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 */ - NodeSettings.decodeDelimited = function decodeDelimited(reader) { + RubySettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodeSettings message. + * Verifies a RubySettings message. * @function verify - * @memberof google.api.NodeSettings + * @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 */ - NodeSettings.verify = function verify(message) { + RubySettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -11552,35 +16002,35 @@ }; /** - * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static * @param {Object.} object Plain object - * @returns {google.api.NodeSettings} NodeSettings + * @returns {google.api.RubySettings} RubySettings */ - NodeSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.NodeSettings) + RubySettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.RubySettings) return object; - var message = new $root.google.api.NodeSettings(); + var message = new $root.google.api.RubySettings(); if (object.common != null) { if (typeof object.common !== "object") - throw TypeError(".google.api.NodeSettings.common: object expected"); + 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 NodeSettings message. Also converts values to other types if specified. + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static - * @param {google.api.NodeSettings} message NodeSettings + * @param {google.api.RubySettings} message RubySettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodeSettings.toObject = function toObject(message, options) { + RubySettings.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -11592,188 +16042,123 @@ }; /** - * Converts this NodeSettings to JSON. + * Converts this RubySettings to JSON. * @function toJSON - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @instance * @returns {Object.} JSON object */ - NodeSettings.prototype.toJSON = function toJSON() { + RubySettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NodeSettings + * Gets the default type url for RubySettings * @function getTypeUrl - * @memberof google.api.NodeSettings + * @memberof google.api.RubySettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NodeSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.NodeSettings"; + return typeUrlPrefix + "/google.api.RubySettings"; }; - 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; + return RubySettings; + })(); + + api.GoSettings = (function() { /** - * DotnetSettings ignoredResources. - * @member {Array.} ignoredResources - * @memberof google.api.DotnetSettings - * @instance + * Properties of a GoSettings. + * @memberof google.api + * @interface IGoSettings + * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common */ - DotnetSettings.prototype.ignoredResources = $util.emptyArray; /** - * DotnetSettings forcedNamespaceAliases. - * @member {Array.} forcedNamespaceAliases - * @memberof google.api.DotnetSettings - * @instance + * Constructs a new GoSettings. + * @memberof google.api + * @classdesc Represents a GoSettings. + * @implements IGoSettings + * @constructor + * @param {google.api.IGoSettings=} [properties] Properties to set */ - DotnetSettings.prototype.forcedNamespaceAliases = $util.emptyArray; + 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]]; + } /** - * DotnetSettings handwrittenSignatures. - * @member {Array.} handwrittenSignatures - * @memberof google.api.DotnetSettings + * GoSettings common. + * @member {google.api.ICommonLanguageSettings|null|undefined} common + * @memberof google.api.GoSettings * @instance */ - DotnetSettings.prototype.handwrittenSignatures = $util.emptyArray; + GoSettings.prototype.common = null; /** - * Creates a new DotnetSettings instance using the specified properties. + * Creates a new GoSettings instance using the specified properties. * @function create - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @static - * @param {google.api.IDotnetSettings=} [properties] Properties to set - * @returns {google.api.DotnetSettings} DotnetSettings instance + * @param {google.api.IGoSettings=} [properties] Properties to set + * @returns {google.api.GoSettings} GoSettings instance */ - DotnetSettings.create = function create(properties) { - return new DotnetSettings(properties); + GoSettings.create = function create(properties) { + return new GoSettings(properties); }; /** - * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encode - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encode = function encode(message, 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(); - 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. + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @static - * @param {google.api.IDotnetSettings} message DotnetSettings message or plain object to encode + * @param {google.api.IGoSettings} message GoSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DotnetSettings.encodeDelimited = function encodeDelimited(message, writer) { + GoSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DotnetSettings message from the specified reader or buffer. + * Decodes a GoSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.DotnetSettings + * @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.DotnetSettings} DotnetSettings + * @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 */ - DotnetSettings.decode = function decode(reader, length) { + GoSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.DotnetSettings(), key, value; + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.GoSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -11781,70 +16166,6 @@ 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; @@ -11854,30 +16175,30 @@ }; /** - * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * Decodes a GoSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.DotnetSettings} DotnetSettings + * @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 */ - DotnetSettings.decodeDelimited = function decodeDelimited(reader) { + GoSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DotnetSettings message. + * Verifies a GoSettings message. * @function verify - * @memberof google.api.DotnetSettings + * @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 */ - DotnetSettings.verify = function verify(message) { + GoSettings.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.common != null && message.hasOwnProperty("common")) { @@ -11885,203 +16206,99 @@ 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. + * Creates a GoSettings 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]); + * @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 DotnetSettings message. Also converts values to other types if specified. + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @static - * @param {google.api.DotnetSettings} message DotnetSettings + * @param {google.api.GoSettings} message GoSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DotnetSettings.toObject = function toObject(message, options) { + GoSettings.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. + * Converts this GoSettings to JSON. * @function toJSON - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @instance * @returns {Object.} JSON object */ - DotnetSettings.prototype.toJSON = function toJSON() { + GoSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DotnetSettings + * Gets the default type url for GoSettings * @function getTypeUrl - * @memberof google.api.DotnetSettings + * @memberof google.api.GoSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DotnetSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.DotnetSettings"; + return typeUrlPrefix + "/google.api.GoSettings"; }; - return DotnetSettings; + return GoSettings; })(); - api.RubySettings = (function() { + api.MethodSettings = (function() { /** - * Properties of a RubySettings. + * Properties of a MethodSettings. * @memberof google.api - * @interface IRubySettings - * @property {google.api.ICommonLanguageSettings|null} [common] RubySettings common + * @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 RubySettings. + * Constructs a new MethodSettings. * @memberof google.api - * @classdesc Represents a RubySettings. - * @implements IRubySettings + * @classdesc Represents a MethodSettings. + * @implements IMethodSettings * @constructor - * @param {google.api.IRubySettings=} [properties] Properties to set + * @param {google.api.IMethodSettings=} [properties] Properties to set */ - function RubySettings(properties) { + function MethodSettings(properties) { + this.autoPopulatedFields = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -12089,75 +16306,106 @@ } /** - * RubySettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.RubySettings + * MethodSettings selector. + * @member {string} selector + * @memberof google.api.MethodSettings * @instance */ - RubySettings.prototype.common = null; + MethodSettings.prototype.selector = ""; /** - * Creates a new RubySettings instance using the specified properties. + * 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.RubySettings + * @memberof google.api.MethodSettings * @static - * @param {google.api.IRubySettings=} [properties] Properties to set - * @returns {google.api.RubySettings} RubySettings instance + * @param {google.api.IMethodSettings=} [properties] Properties to set + * @returns {google.api.MethodSettings} MethodSettings instance */ - RubySettings.create = function create(properties) { - return new RubySettings(properties); + MethodSettings.create = function create(properties) { + return new MethodSettings(properties); }; /** - * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encode - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encode = function encode(message, writer) { + MethodSettings.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.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 RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @static - * @param {google.api.IRubySettings} message RubySettings message or plain object to encode + * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - RubySettings.encodeDelimited = function encodeDelimited(message, writer) { + MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a RubySettings message from the specified reader or buffer. + * Decodes a MethodSettings message from the specified reader or buffer. * @function decode - * @memberof google.api.RubySettings + * @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.RubySettings} RubySettings + * @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 */ - RubySettings.decode = function decode(reader, length) { + MethodSettings.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.RubySettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); + 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: @@ -12169,445 +16417,723 @@ }; /** - * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.RubySettings} RubySettings + * @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 */ - RubySettings.decodeDelimited = function decodeDelimited(reader) { + MethodSettings.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a RubySettings message. + * Verifies a MethodSettings message. * @function verify - * @memberof google.api.RubySettings + * @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 */ - RubySettings.verify = function verify(message) { + MethodSettings.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 (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 "common." + 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 RubySettings message from a plain object. Also converts values to their respective internal types. + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @static * @param {Object.} object Plain object - * @returns {google.api.RubySettings} RubySettings + * @returns {google.api.MethodSettings} MethodSettings */ - RubySettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.RubySettings) + MethodSettings.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.MethodSettings) 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); + 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 RubySettings message. Also converts values to other types if specified. + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @static - * @param {google.api.RubySettings} message RubySettings + * @param {google.api.MethodSettings} message MethodSettings * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - RubySettings.toObject = function toObject(message, options) { + MethodSettings.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); + 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 RubySettings to JSON. + * Converts this MethodSettings to JSON. * @function toJSON - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @instance * @returns {Object.} JSON object */ - RubySettings.prototype.toJSON = function toJSON() { + MethodSettings.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for RubySettings + * Gets the default type url for MethodSettings * @function getTypeUrl - * @memberof google.api.RubySettings + * @memberof google.api.MethodSettings * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - RubySettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + MethodSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.api.RubySettings"; + return typeUrlPrefix + "/google.api.MethodSettings"; }; - return RubySettings; - })(); + MethodSettings.LongRunning = (function() { - api.GoSettings = (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 + */ - /** - * Properties of a GoSettings. - * @memberof google.api - * @interface IGoSettings - * @property {google.api.ICommonLanguageSettings|null} [common] GoSettings common - */ + /** + * 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) { + 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(); + 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; + }; - /** - * 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]]; - } + /** + * 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); + }; - /** - * GoSettings common. - * @member {google.api.ICommonLanguageSettings|null|undefined} common - * @memberof google.api.GoSettings - * @instance - */ - GoSettings.prototype.common = null; + /** + * 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"; + }; - /** - * 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); - }; + return LongRunning; + })(); - /** - * 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; - }; + return MethodSettings; + })(); - /** - * 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(); - }; + /** + * 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; + })(); - /** - * 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) { - 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(); - switch (tag >>> 3) { - case 1: { - message.common = $root.google.api.CommonLanguageSettings.decode(reader, reader.uint32()); - break; - } - default: - reader.skipType(tag & 7); - break; - } - } - return message; - }; + /** + * 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; + })(); - /** - * 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()); - }; + /** + * 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; + })(); - /** - * 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; - }; + /** + * 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() { /** - * 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 + * 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 */ - 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 + * Constructs a new ResourceDescriptor. + * @memberof google.api + * @classdesc Represents a ResourceDescriptor. + * @implements IResourceDescriptor + * @constructor + * @param {google.api.IResourceDescriptor=} [properties] Properties to set */ - 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; - }; + 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]]; + } /** - * Converts this GoSettings to JSON. - * @function toJSON - * @memberof google.api.GoSettings + * ResourceDescriptor type. + * @member {string} type + * @memberof google.api.ResourceDescriptor * @instance - * @returns {Object.} JSON object */ - GoSettings.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + ResourceDescriptor.prototype.type = ""; /** - * 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 + * ResourceDescriptor pattern. + * @member {Array.} pattern + * @memberof google.api.ResourceDescriptor + * @instance */ - GoSettings.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.api.GoSettings"; - }; - - return GoSettings; - })(); - - api.MethodSettings = (function() { + ResourceDescriptor.prototype.pattern = $util.emptyArray; /** - * 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 + * ResourceDescriptor nameField. + * @member {string} nameField + * @memberof google.api.ResourceDescriptor + * @instance */ + ResourceDescriptor.prototype.nameField = ""; /** - * Constructs a new MethodSettings. - * @memberof google.api - * @classdesc Represents a MethodSettings. - * @implements IMethodSettings - * @constructor - * @param {google.api.IMethodSettings=} [properties] Properties to set + * ResourceDescriptor history. + * @member {google.api.ResourceDescriptor.History} history + * @memberof google.api.ResourceDescriptor + * @instance */ - 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]]; - } + ResourceDescriptor.prototype.history = 0; /** - * MethodSettings selector. - * @member {string} selector - * @memberof google.api.MethodSettings + * ResourceDescriptor plural. + * @member {string} plural + * @memberof google.api.ResourceDescriptor * @instance */ - MethodSettings.prototype.selector = ""; + ResourceDescriptor.prototype.plural = ""; /** - * MethodSettings longRunning. - * @member {google.api.MethodSettings.ILongRunning|null|undefined} longRunning - * @memberof google.api.MethodSettings + * ResourceDescriptor singular. + * @member {string} singular + * @memberof google.api.ResourceDescriptor * @instance */ - MethodSettings.prototype.longRunning = null; + ResourceDescriptor.prototype.singular = ""; /** - * MethodSettings autoPopulatedFields. - * @member {Array.} autoPopulatedFields - * @memberof google.api.MethodSettings + * ResourceDescriptor style. + * @member {Array.} style + * @memberof google.api.ResourceDescriptor * @instance */ - MethodSettings.prototype.autoPopulatedFields = $util.emptyArray; + ResourceDescriptor.prototype.style = $util.emptyArray; /** - * Creates a new MethodSettings instance using the specified properties. + * Creates a new ResourceDescriptor instance using the specified properties. * @function create - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IMethodSettings=} [properties] Properties to set - * @returns {google.api.MethodSettings} MethodSettings instance + * @param {google.api.IResourceDescriptor=} [properties] Properties to set + * @returns {google.api.ResourceDescriptor} ResourceDescriptor instance */ - MethodSettings.create = function create(properties) { - return new MethodSettings(properties); + ResourceDescriptor.create = function create(properties) { + return new ResourceDescriptor(properties); }; /** - * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encode - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encode = function encode(message, writer) { + ResourceDescriptor.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]); + 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 MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. * @function encodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.IMethodSettings} message MethodSettings message or plain object to encode + * @param {google.api.IResourceDescriptor} message ResourceDescriptor message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - MethodSettings.encodeDelimited = function encodeDelimited(message, writer) { + ResourceDescriptor.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a MethodSettings message from the specified reader or buffer. + * Decodes a ResourceDescriptor message from the specified reader or buffer. * @function decode - * @memberof google.api.MethodSettings + * @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.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decode = function decode(reader, length) { + ResourceDescriptor.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.MethodSettings(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.selector = reader.string(); + message.type = reader.string(); break; } case 2: { - message.longRunning = $root.google.api.MethodSettings.LongRunning.decode(reader, reader.uint32()); + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); break; } case 3: { - if (!(message.autoPopulatedFields && message.autoPopulatedFields.length)) - message.autoPopulatedFields = []; - message.autoPopulatedFields.push(reader.string()); + 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: @@ -12619,493 +17145,477 @@ }; /** - * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.api.MethodSettings} MethodSettings + * @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 */ - MethodSettings.decodeDelimited = function decodeDelimited(reader) { + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a MethodSettings message. + * Verifies a ResourceDescriptor message. * @function verify - * @memberof google.api.MethodSettings + * @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 */ - MethodSettings.verify = function verify(message) { + ResourceDescriptor.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.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.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"; + 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 MethodSettings message from a plain object. Also converts values to their respective internal types. + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @static * @param {Object.} object Plain object - * @returns {google.api.MethodSettings} MethodSettings + * @returns {google.api.ResourceDescriptor} ResourceDescriptor */ - MethodSettings.fromObject = function fromObject(object) { - if (object instanceof $root.google.api.MethodSettings) + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) 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); + 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.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]); + 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 MethodSettings message. Also converts values to other types if specified. + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. * @function toObject - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @static - * @param {google.api.MethodSettings} message MethodSettings + * @param {google.api.ResourceDescriptor} message ResourceDescriptor * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MethodSettings.toObject = function toObject(message, options) { + ResourceDescriptor.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.autoPopulatedFields = []; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } if (options.defaults) { - object.selector = ""; - object.longRunning = null; + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; } - 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]; + 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 MethodSettings to JSON. + * Converts this ResourceDescriptor to JSON. * @function toJSON - * @memberof google.api.MethodSettings + * @memberof google.api.ResourceDescriptor * @instance * @returns {Object.} JSON object */ - MethodSettings.prototype.toJSON = function toJSON() { + ResourceDescriptor.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MethodSettings + * Gets the default type url for ResourceDescriptor * @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; + * @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"; + }; - /** - * LongRunning maxPollDelay. - * @member {google.protobuf.IDuration|null|undefined} maxPollDelay - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.maxPollDelay = null; + /** + * 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; + })(); - /** - * LongRunning totalPollTimeout. - * @member {google.protobuf.IDuration|null|undefined} totalPollTimeout - * @memberof google.api.MethodSettings.LongRunning - * @instance - */ - LongRunning.prototype.totalPollTimeout = null; + /** + * 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; + })(); - /** - * 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); - }; + return ResourceDescriptor; + })(); - /** - * 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; - }; + api.ResourceReference = (function() { - /** - * 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(); - }; + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ - /** - * 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) { - 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(); - 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; - }; + /** + * 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]]; + } - /** - * 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()); - }; + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; - /** - * 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; - }; + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; - /** - * 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 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); + }; - /** - * 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; - }; + /** + * 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; + }; - /** - * 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); - }; + /** + * 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(); + }; - /** - * 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"; + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; } - return typeUrlPrefix + "/google.api.MethodSettings.LongRunning"; - }; + } + return message; + }; - return LongRunning; - })(); + /** + * 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()); + }; - return MethodSettings; - })(); + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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; + }; - /** - * 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; - })(); + /** + * 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"; + }; - /** - * LaunchStage enum. - * @name google.api.LaunchStage - * @enum {number} - * @property {number} LAUNCH_STAGE_UNSPECIFIED=0 LAUNCH_STAGE_UNSPECIFIED value - * @property {number} UNIMPLEMENTED=6 UNIMPLEMENTED value - * @property {number} PRELAUNCH=7 PRELAUNCH value - * @property {number} EARLY_ACCESS=1 EARLY_ACCESS value - * @property {number} ALPHA=2 ALPHA value - * @property {number} BETA=3 BETA value - * @property {number} GA=4 GA value - * @property {number} DEPRECATED=5 DEPRECATED value - */ - api.LaunchStage = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "LAUNCH_STAGE_UNSPECIFIED"] = 0; - values[valuesById[6] = "UNIMPLEMENTED"] = 6; - values[valuesById[7] = "PRELAUNCH"] = 7; - values[valuesById[1] = "EARLY_ACCESS"] = 1; - values[valuesById[2] = "ALPHA"] = 2; - values[valuesById[3] = "BETA"] = 3; - values[valuesById[4] = "GA"] = 4; - values[valuesById[5] = "DEPRECATED"] = 5; - return values; + return ResourceReference; })(); return api; @@ -25130,31 +29640,272 @@ return values; })(); - return Annotation; - })(); + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; - return GeneratedCodeInfo; + return Duration; })(); - protobuf.Timestamp = (function() { + protobuf.FieldMask = (function() { /** - * Properties of a Timestamp. + * Properties of a FieldMask. * @memberof google.protobuf - * @interface ITimestamp - * @property {number|Long|null} [seconds] Timestamp seconds - * @property {number|null} [nanos] Timestamp nanos + * @interface IFieldMask + * @property {Array.|null} [paths] FieldMask paths */ /** - * Constructs a new Timestamp. + * Constructs a new FieldMask. * @memberof google.protobuf - * @classdesc Represents a Timestamp. - * @implements ITimestamp + * @classdesc Represents a FieldMask. + * @implements IFieldMask * @constructor - * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @param {google.protobuf.IFieldMask=} [properties] Properties to set */ - function Timestamp(properties) { + function FieldMask(properties) { + this.paths = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25162,89 +29913,78 @@ } /** - * 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 + * FieldMask paths. + * @member {Array.} paths + * @memberof google.protobuf.FieldMask * @instance */ - Timestamp.prototype.nanos = 0; + FieldMask.prototype.paths = $util.emptyArray; /** - * Creates a new Timestamp instance using the specified properties. + * Creates a new FieldMask instance using the specified properties. * @function create - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ITimestamp=} [properties] Properties to set - * @returns {google.protobuf.Timestamp} Timestamp instance + * @param {google.protobuf.IFieldMask=} [properties] Properties to set + * @returns {google.protobuf.FieldMask} FieldMask instance */ - Timestamp.create = function create(properties) { - return new Timestamp(properties); + FieldMask.create = function create(properties) { + return new FieldMask(properties); }; /** - * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified FieldMask message. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encode = function encode(message, writer) { + FieldMask.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) - writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); - if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + if (message.paths != null && message.paths.length) + for (var i = 0; i < message.paths.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.paths[i]); return writer; }; /** - * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. + * Encodes the specified FieldMask message, length delimited. Does not implicitly {@link google.protobuf.FieldMask.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode + * @param {google.protobuf.IFieldMask} message FieldMask message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Timestamp.encodeDelimited = function encodeDelimited(message, writer) { + FieldMask.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Timestamp message from the specified reader or buffer. + * Decodes a FieldMask message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decode = function decode(reader, length) { + FieldMask.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldMask(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.seconds = reader.int64(); - break; - } - case 2: { - message.nanos = reader.int32(); + if (!(message.paths && message.paths.length)) + message.paths = []; + message.paths.push(reader.string()); break; } default: @@ -25256,146 +29996,135 @@ }; /** - * Decodes a Timestamp message from the specified reader or buffer, length delimited. + * Decodes a FieldMask message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.FieldMask} FieldMask * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - Timestamp.decodeDelimited = function decodeDelimited(reader) { + FieldMask.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Timestamp message. + * Verifies a FieldMask message. * @function verify - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - Timestamp.verify = function verify(message) { + FieldMask.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.seconds != null && message.hasOwnProperty("seconds")) - if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) - return "seconds: integer|Long expected"; - if (message.nanos != null && message.hasOwnProperty("nanos")) - if (!$util.isInteger(message.nanos)) - return "nanos: integer expected"; + if (message.paths != null && message.hasOwnProperty("paths")) { + if (!Array.isArray(message.paths)) + return "paths: array expected"; + for (var i = 0; i < message.paths.length; ++i) + if (!$util.isString(message.paths[i])) + return "paths: string[] expected"; + } return null; }; /** - * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. + * Creates a FieldMask message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Timestamp} Timestamp + * @returns {google.protobuf.FieldMask} FieldMask */ - Timestamp.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Timestamp) + FieldMask.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FieldMask) 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; + var message = new $root.google.protobuf.FieldMask(); + if (object.paths) { + if (!Array.isArray(object.paths)) + throw TypeError(".google.protobuf.FieldMask.paths: array expected"); + message.paths = []; + for (var i = 0; i < object.paths.length; ++i) + message.paths[i] = String(object.paths[i]); + } return message; }; /** - * Creates a plain object from a Timestamp message. Also converts values to other types if specified. + * Creates a plain object from a FieldMask message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static - * @param {google.protobuf.Timestamp} message Timestamp + * @param {google.protobuf.FieldMask} message FieldMask * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Timestamp.toObject = function toObject(message, options) { + FieldMask.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 (options.arrays || options.defaults) + object.paths = []; + if (message.paths && message.paths.length) { + object.paths = []; + for (var j = 0; j < message.paths.length; ++j) + object.paths[j] = message.paths[j]; } - 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. + * Converts this FieldMask to JSON. * @function toJSON - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @instance * @returns {Object.} JSON object */ - Timestamp.prototype.toJSON = function toJSON() { + FieldMask.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Timestamp + * Gets the default type url for FieldMask * @function getTypeUrl - * @memberof google.protobuf.Timestamp + * @memberof google.protobuf.FieldMask * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + FieldMask.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Timestamp"; + return typeUrlPrefix + "/google.protobuf.FieldMask"; }; - return Timestamp; + return FieldMask; })(); - protobuf.Duration = (function() { + protobuf.Timestamp = (function() { /** - * Properties of a Duration. + * Properties of a Timestamp. * @memberof google.protobuf - * @interface IDuration - * @property {number|Long|null} [seconds] Duration seconds - * @property {number|null} [nanos] Duration nanos + * @interface ITimestamp + * @property {number|Long|null} [seconds] Timestamp seconds + * @property {number|null} [nanos] Timestamp nanos */ /** - * Constructs a new Duration. + * Constructs a new Timestamp. * @memberof google.protobuf - * @classdesc Represents a Duration. - * @implements IDuration + * @classdesc Represents a Timestamp. + * @implements ITimestamp * @constructor - * @param {google.protobuf.IDuration=} [properties] Properties to set + * @param {google.protobuf.ITimestamp=} [properties] Properties to set */ - function Duration(properties) { + function Timestamp(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -25403,43 +30132,43 @@ } /** - * Duration seconds. + * Timestamp seconds. * @member {number|Long} seconds - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance */ - Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + Timestamp.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; /** - * Duration nanos. + * Timestamp nanos. * @member {number} nanos - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance */ - Duration.prototype.nanos = 0; + Timestamp.prototype.nanos = 0; /** - * Creates a new Duration instance using the specified properties. + * Creates a new Timestamp instance using the specified properties. * @function create - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IDuration=} [properties] Properties to set - * @returns {google.protobuf.Duration} Duration instance + * @param {google.protobuf.ITimestamp=} [properties] Properties to set + * @returns {google.protobuf.Timestamp} Timestamp instance */ - Duration.create = function create(properties) { - return new Duration(properties); + Timestamp.create = function create(properties) { + return new Timestamp(properties); }; /** - * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Timestamp message. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encode - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encode = function encode(message, writer) { + Timestamp.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) @@ -25450,33 +30179,33 @@ }; /** - * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * Encodes the specified Timestamp message, length delimited. Does not implicitly {@link google.protobuf.Timestamp.verify|verify} messages. * @function encodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {google.protobuf.ITimestamp} message Timestamp message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - Duration.encodeDelimited = function encodeDelimited(message, writer) { + Timestamp.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a Duration message from the specified reader or buffer. + * Decodes a Timestamp message from the specified reader or buffer. * @function decode - * @memberof google.protobuf.Duration + * @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.Duration} Duration + * @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 */ - Duration.decode = function decode(reader, length) { + Timestamp.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Timestamp(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -25497,30 +30226,30 @@ }; /** - * Decodes a Duration message from the specified reader or buffer, length delimited. + * Decodes a Timestamp message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.protobuf.Duration} Duration + * @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 */ - Duration.decodeDelimited = function decodeDelimited(reader) { + Timestamp.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a Duration message. + * Verifies a Timestamp message. * @function verify - * @memberof google.protobuf.Duration + * @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 */ - Duration.verify = function verify(message) { + Timestamp.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.seconds != null && message.hasOwnProperty("seconds")) @@ -25533,17 +30262,17 @@ }; /** - * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * Creates a Timestamp message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static * @param {Object.} object Plain object - * @returns {google.protobuf.Duration} Duration + * @returns {google.protobuf.Timestamp} Timestamp */ - Duration.fromObject = function fromObject(object) { - if (object instanceof $root.google.protobuf.Duration) + Timestamp.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Timestamp) return object; - var message = new $root.google.protobuf.Duration(); + var message = new $root.google.protobuf.Timestamp(); if (object.seconds != null) if ($util.Long) (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; @@ -25559,15 +30288,15 @@ }; /** - * Creates a plain object from a Duration message. Also converts values to other types if specified. + * Creates a plain object from a Timestamp message. Also converts values to other types if specified. * @function toObject - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static - * @param {google.protobuf.Duration} message Duration + * @param {google.protobuf.Timestamp} message Timestamp * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - Duration.toObject = function toObject(message, options) { + Timestamp.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -25590,32 +30319,32 @@ }; /** - * Converts this Duration to JSON. + * Converts this Timestamp to JSON. * @function toJSON - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @instance * @returns {Object.} JSON object */ - Duration.prototype.toJSON = function toJSON() { + Timestamp.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for Duration + * Gets the default type url for Timestamp * @function getTypeUrl - * @memberof google.protobuf.Duration + * @memberof google.protobuf.Timestamp * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Timestamp.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.protobuf.Duration"; + return typeUrlPrefix + "/google.protobuf.Timestamp"; }; - return Duration; + return Timestamp; })(); protobuf.Any = (function() { diff --git a/packages/google-cloud-commerce-consumer-procurement/protos/protos.json b/packages/google-cloud-commerce-consumer-procurement/protos/protos.json index 0d266dba27c..14d75b29ba2 100644 --- a/packages/google-cloud-commerce-consumer-procurement/protos/protos.json +++ b/packages/google-cloud-commerce-consumer-procurement/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -15,6 +18,7 @@ "csharp_namespace": "Google.Cloud.Commerce.Consumer.Procurement.V1", "go_package": "cloud.google.com/go/commerce/consumer/procurement/apiv1/procurementpb;procurementpb", "java_multiple_files": true, + "java_outer_classname": "LicenseManagementServiceProto", "java_package": "com.google.cloud.commerce.consumer.procurement.v1", "php_namespace": "Google\\Cloud\\Commerce\\Consumer\\Procurement\\V1", "ruby_package": "Google::Cloud::Commerce::Consumer::Procurement::V1", @@ -22,6 +26,317 @@ "(google.api.resource_definition).pattern": "billingAccounts/{consumer_billing_account}/offers/{offer}" }, "nested": { + "LicenseManagementService": { + "options": { + "(google.api.default_host)": "cloudcommerceconsumerprocurement.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/cloud-platform" + }, + "methods": { + "GetLicensePool": { + "requestType": "GetLicensePoolRequest", + "responseType": "LicensePool", + "options": { + "(google.api.http).get": "/v1/{name=billingAccounts/*/orders/*/licensePool}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=billingAccounts/*/orders/*/licensePool}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "UpdateLicensePool": { + "requestType": "UpdateLicensePoolRequest", + "responseType": "LicensePool", + "options": { + "(google.api.http).patch": "/v1/{license_pool.name=billingAccounts/*/orders/*/licensePool/*}", + "(google.api.http).body": "license_pool", + "(google.api.method_signature)": "license_pool,update_mask" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "patch": "/v1/{license_pool.name=billingAccounts/*/orders/*/licensePool/*}", + "body": "license_pool" + } + }, + { + "(google.api.method_signature)": "license_pool,update_mask" + } + ] + }, + "Assign": { + "requestType": "AssignRequest", + "responseType": "AssignResponse", + "options": { + "(google.api.http).post": "/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,usernames" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=billingAccounts/*/orders/*/licensePool}:assign", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,usernames" + } + ] + }, + "Unassign": { + "requestType": "UnassignRequest", + "responseType": "UnassignResponse", + "options": { + "(google.api.http).post": "/v1/{parent=billingAccounts/*/orders/*/licensePool}:unassign", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent,usernames" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=billingAccounts/*/orders/*/licensePool}:unassign", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent,usernames" + } + ] + }, + "EnumerateLicensedUsers": { + "requestType": "EnumerateLicensedUsersRequest", + "responseType": "EnumerateLicensedUsersResponse", + "options": { + "(google.api.http).get": "/v1/{parent=billingAccounts/*/orders/*/licensePool}:enumerateLicensedUsers", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{parent=billingAccounts/*/orders/*/licensePool}:enumerateLicensedUsers" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + } + } + }, + "AssignmentProtocol": { + "oneofs": { + "assignmentType": { + "oneof": [ + "manualAssignmentType", + "autoAssignmentType" + ] + } + }, + "fields": { + "manualAssignmentType": { + "type": "ManualAssignmentType", + "id": 2 + }, + "autoAssignmentType": { + "type": "AutoAssignmentType", + "id": 3 + } + }, + "nested": { + "ManualAssignmentType": { + "fields": {} + }, + "AutoAssignmentType": { + "fields": { + "inactiveLicenseTtl": { + "type": "google.protobuf.Duration", + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "LicensePool": { + "options": { + "(google.api.resource).type": "cloudcommerceconsumerprocurement.googleapis.com/LicensePool", + "(google.api.resource).pattern": "billingAccounts/{billing_account}/orders/{order}/licensePool", + "(google.api.resource).plural": "licensePools", + "(google.api.resource).singular": "licensePool" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "licenseAssignmentProtocol": { + "type": "AssignmentProtocol", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "availableLicenseCount": { + "type": "int32", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "totalLicenseCount": { + "type": "int32", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "GetLicensePoolRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UpdateLicensePoolRequest": { + "fields": { + "licensePool": { + "type": "LicensePool", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "updateMask": { + "type": "google.protobuf.FieldMask", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AssignRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "usernames": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "AssignResponse": { + "fields": {} + }, + "UnassignRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "usernames": { + "rule": "repeated", + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "UnassignResponse": { + "fields": {} + }, + "EnumerateLicensedUsersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "LicensedUser": { + "fields": { + "username": { + "type": "string", + "id": 1 + }, + "assignTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "recentUsageTime": { + "type": "google.protobuf.Timestamp", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + }, + "EnumerateLicensedUsersResponse": { + "fields": { + "licensedUsers": { + "rule": "repeated", + "type": "LicensedUser", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, "LineItemChangeType": { "values": { "LINE_ITEM_CHANGE_TYPE_UNSPECIFIED": 0, @@ -357,9 +672,64 @@ "(google.api.method_signature)": "parent" } ] + }, + "ModifyOrder": { + "requestType": "ModifyOrderRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=billingAccounts/*/orders/*}:modify", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Order", + "(google.longrunning.operation_info).metadata_type": "ModifyOrderMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=billingAccounts/*/orders/*}:modify", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Order", + "metadata_type": "ModifyOrderMetadata" + } + } + ] + }, + "CancelOrder": { + "requestType": "CancelOrderRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=billingAccounts/*/orders/*}:cancel", + "(google.api.http).body": "*", + "(google.longrunning.operation_info).response_type": "Order", + "(google.longrunning.operation_info).metadata_type": "CancelOrderMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=billingAccounts/*/orders/*}:cancel", + "body": "*" + } + }, + { + "(google.longrunning.operation_info)": { + "response_type": "Order", + "metadata_type": "CancelOrderMetadata" + } + } + ] } } }, + "AutoRenewalBehavior": { + "values": { + "AUTO_RENEWAL_BEHAVIOR_UNSPECIFIED": 0, + "AUTO_RENEWAL_BEHAVIOR_ENABLE": 1, + "AUTO_RENEWAL_BEHAVIOR_DISABLE": 2 + } + }, "PlaceOrderRequest": { "fields": { "parent": { @@ -394,10 +764,127 @@ } } }, - "PlaceOrderMetadata": { + "PlaceOrderMetadata": { + "fields": {} + }, + "GetOrderRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "ListOrdersRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "pageSize": { + "type": "int32", + "id": 2 + }, + "pageToken": { + "type": "string", + "id": 3 + }, + "filter": { + "type": "string", + "id": 4 + } + } + }, + "ListOrdersResponse": { + "fields": { + "orders": { + "rule": "repeated", + "type": "Order", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "ModifyOrderRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "modifications": { + "rule": "repeated", + "type": "Modification", + "id": 6, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "displayName": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "etag": { + "type": "string", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "Modification": { + "fields": { + "lineItemId": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "changeType": { + "type": "LineItemChangeType", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "newLineItemInfo": { + "type": "LineItemInfo", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "autoRenewalBehavior": { + "type": "AutoRenewalBehavior", + "id": 4, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + } + } + }, + "ModifyOrderMetadata": { "fields": {} }, - "GetOrderRequest": { + "CancelOrderRequest": { "fields": { "name": { "type": "string", @@ -405,44 +892,34 @@ "options": { "(google.api.field_behavior)": "REQUIRED" } - } - } - }, - "ListOrdersRequest": { - "fields": { - "parent": { + }, + "etag": { "type": "string", - "id": 1, + "id": 2, "options": { - "(google.api.field_behavior)": "REQUIRED" + "(google.api.field_behavior)": "OPTIONAL" } }, - "pageSize": { - "type": "int32", - "id": 2 - }, - "pageToken": { - "type": "string", - "id": 3 - }, - "filter": { - "type": "string", - "id": 4 + "cancellationPolicy": { + "type": "CancellationPolicy", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } - } - }, - "ListOrdersResponse": { - "fields": { - "orders": { - "rule": "repeated", - "type": "Order", - "id": 1 - }, - "nextPageToken": { - "type": "string", - "id": 2 + }, + "nested": { + "CancellationPolicy": { + "values": { + "CANCELLATION_POLICY_UNSPECIFIED": 0, + "CANCELLATION_POLICY_CANCEL_IMMEDIATELY": 1, + "CANCELLATION_POLICY_CANCEL_AT_TERM_END": 2 + } } } + }, + "CancelOrderMetadata": { + "fields": {} } } }, @@ -889,110 +1366,14 @@ }, "api": { "options": { - "go_package": "google.golang.org/genproto/googleapis/api;api", + "go_package": "google.golang.org/genproto/googleapis/api/annotations;annotations", "java_multiple_files": true, - "java_outer_classname": "LaunchStageProto", + "java_outer_classname": "ResourceProto", "java_package": "com.google.api", "objc_class_prefix": "GAPI", "cc_enable_arenas": true }, "nested": { - "fieldBehavior": { - "rule": "repeated", - "type": "google.api.FieldBehavior", - "id": 1052, - "extend": "google.protobuf.FieldOptions" - }, - "FieldBehavior": { - "values": { - "FIELD_BEHAVIOR_UNSPECIFIED": 0, - "OPTIONAL": 1, - "REQUIRED": 2, - "OUTPUT_ONLY": 3, - "INPUT_ONLY": 4, - "IMMUTABLE": 5, - "UNORDERED_LIST": 6, - "NON_EMPTY_DEFAULT": 7, - "IDENTIFIER": 8 - } - }, - "resourceReference": { - "type": "google.api.ResourceReference", - "id": 1055, - "extend": "google.protobuf.FieldOptions" - }, - "resourceDefinition": { - "rule": "repeated", - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.FileOptions" - }, - "resource": { - "type": "google.api.ResourceDescriptor", - "id": 1053, - "extend": "google.protobuf.MessageOptions" - }, - "ResourceDescriptor": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "pattern": { - "rule": "repeated", - "type": "string", - "id": 2 - }, - "nameField": { - "type": "string", - "id": 3 - }, - "history": { - "type": "History", - "id": 4 - }, - "plural": { - "type": "string", - "id": 5 - }, - "singular": { - "type": "string", - "id": 6 - }, - "style": { - "rule": "repeated", - "type": "Style", - "id": 10 - } - }, - "nested": { - "History": { - "values": { - "HISTORY_UNSPECIFIED": 0, - "ORIGINALLY_SINGLE_PATTERN": 1, - "FUTURE_MULTI_PATTERN": 2 - } - }, - "Style": { - "values": { - "STYLE_UNSPECIFIED": 0, - "DECLARATIVE_FRIENDLY": 1 - } - } - } - }, - "ResourceReference": { - "fields": { - "type": { - "type": "string", - "id": 1 - }, - "childType": { - "type": "string", - "id": 2 - } - } - }, "http": { "type": "HttpRule", "id": 72295728, @@ -1374,6 +1755,102 @@ "GA": 4, "DEPRECATED": 5 } + }, + "fieldBehavior": { + "rule": "repeated", + "type": "google.api.FieldBehavior", + "id": 1052, + "extend": "google.protobuf.FieldOptions" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "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 + } + } } } }, @@ -2652,7 +3129,7 @@ } } }, - "Timestamp": { + "Duration": { "fields": { "seconds": { "type": "int64", @@ -2664,7 +3141,16 @@ } } }, - "Duration": { + "FieldMask": { + "fields": { + "paths": { + "rule": "repeated", + "type": "string", + "id": 1 + } + } + }, + "Timestamp": { "fields": { "seconds": { "type": "int64", diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/README.md b/packages/google-cloud-commerce-consumer-procurement/samples/README.md index 4e5097f9ab3..d244da55c4c 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/README.md +++ b/packages/google-cloud-commerce-consumer-procurement/samples/README.md @@ -12,9 +12,16 @@ * [Before you begin](#before-you-begin) * [Samples](#samples) + * [Consumer_procurement_service.cancel_order](#consumer_procurement_service.cancel_order) * [Consumer_procurement_service.get_order](#consumer_procurement_service.get_order) * [Consumer_procurement_service.list_orders](#consumer_procurement_service.list_orders) + * [Consumer_procurement_service.modify_order](#consumer_procurement_service.modify_order) * [Consumer_procurement_service.place_order](#consumer_procurement_service.place_order) + * [License_management_service.assign](#license_management_service.assign) + * [License_management_service.enumerate_licensed_users](#license_management_service.enumerate_licensed_users) + * [License_management_service.get_license_pool](#license_management_service.get_license_pool) + * [License_management_service.unassign](#license_management_service.unassign) + * [License_management_service.update_license_pool](#license_management_service.update_license_pool) * [Consumer_procurement_service.get_order](#consumer_procurement_service.get_order) * [Consumer_procurement_service.list_orders](#consumer_procurement_service.list_orders) * [Consumer_procurement_service.place_order](#consumer_procurement_service.place_order) @@ -35,6 +42,23 @@ Before running the samples, make sure you've followed the steps outlined in +### Consumer_procurement_service.cancel_order + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js` + + +----- + + + + ### Consumer_procurement_service.get_order View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.get_order.js). @@ -69,6 +93,23 @@ __Usage:__ +### Consumer_procurement_service.modify_order + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js` + + +----- + + + + ### Consumer_procurement_service.place_order View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js). @@ -86,6 +127,91 @@ __Usage:__ +### License_management_service.assign + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js` + + +----- + + + + +### License_management_service.enumerate_licensed_users + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js` + + +----- + + + + +### License_management_service.get_license_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js` + + +----- + + + + +### License_management_service.unassign + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js` + + +----- + + + + +### License_management_service.update_license_pool + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js` + + +----- + + + + ### Consumer_procurement_service.get_order View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/consumer_procurement_service.get_order.js). diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js new file mode 100644 index 00000000000..ab68d75f7d7 --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.cancel_order.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 order. + */ + // const name = 'abc123' + /** + * Optional. The weak etag, which can be optionally populated, of the order + * that this cancel request is based on. Validation checking will only happen + * if the invoker supplies this field. + */ + // const etag = 'abc123' + /** + * Optional. Cancellation policy of this request. + */ + // const cancellationPolicy = {} + + // Imports the Procurement library + const {ConsumerProcurementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new ConsumerProcurementServiceClient(); + + async function callCancelOrder() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await procurementClient.cancelOrder(request); + const [response] = await operation.promise(); + console.log(response); + } + + callCancelOrder(); + // [END cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js new file mode 100644 index 00000000000..2d4175ba350 --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.modify_order.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. Name of the order to update. + */ + // const name = 'abc123' + /** + * Optional. Modifications for an existing Order created by an Offer. + * Required when Offer based Order is being modified, except for when going + * from an offer to a public plan. + */ + // const modifications = [1,2,3,4] + /** + * Optional. Updated display name of the order, leave as empty if you do not + * want to update current display name. + */ + // const displayName = 'abc123' + /** + * Optional. The weak etag, which can be optionally populated, of the order + * that this modify request is based on. Validation checking will only happen + * if the invoker supplies this field. + */ + // const etag = 'abc123' + + // Imports the Procurement library + const {ConsumerProcurementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new ConsumerProcurementServiceClient(); + + async function callModifyOrder() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await procurementClient.modifyOrder(request); + const [response] = await operation.promise(); + console.log(response); + } + + callModifyOrder(); + // [END cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js index 2e87a195372..6f6062289e1 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/consumer_procurement_service.place_order.js @@ -45,7 +45,7 @@ function main(parent, displayName) { /** * Optional. A unique identifier for this request. * The server will ignore subsequent requests that provide a duplicate request - * ID for at least 120 minutes after the first request. + * ID for at least 24 hours after the first request. * The request ID must be a valid * UUID (https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). */ diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js new file mode 100644 index 00000000000..1552f0c78b2 --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.assign.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, usernames) { + // [START cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. License pool name. + */ + // const parent = 'abc123' + /** + * Required. Username. + * Format: `name@domain.com`. + */ + // const usernames = ['abc','def'] + + // Imports the Procurement library + const {LicenseManagementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new LicenseManagementServiceClient(); + + async function callAssign() { + // Construct request + const request = { + parent, + usernames, + }; + + // Run request + const response = await procurementClient.assign(request); + console.log(response); + } + + callAssign(); + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js new file mode 100644 index 00000000000..2397756930b --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.enumerate_licensed_users.js @@ -0,0 +1,73 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. License pool name. + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of users to return. The service may return + * fewer than this value. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous `EnumerateLicensedUsers` + * call. Provide this to retrieve the subsequent page. + */ + // const pageToken = 'abc123' + + // Imports the Procurement library + const {LicenseManagementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new LicenseManagementServiceClient(); + + async function callEnumerateLicensedUsers() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = procurementClient.enumerateLicensedUsersAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callEnumerateLicensedUsers(); + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js new file mode 100644 index 00000000000..c5005a962d0 --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.get_license_pool.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 license pool to get. + * Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + */ + // const name = 'abc123' + + // Imports the Procurement library + const {LicenseManagementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new LicenseManagementServiceClient(); + + async function callGetLicensePool() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await procurementClient.getLicensePool(request); + console.log(response); + } + + callGetLicensePool(); + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js new file mode 100644 index 00000000000..39c8621f57f --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.unassign.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, usernames) { + // [START cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Required. License pool name. + */ + // const parent = 'abc123' + /** + * Required. Username. + * Format: `name@domain.com`. + */ + // const usernames = ['abc','def'] + + // Imports the Procurement library + const {LicenseManagementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new LicenseManagementServiceClient(); + + async function callUnassign() { + // Construct request + const request = { + parent, + usernames, + }; + + // Run request + const response = await procurementClient.unassign(request); + console.log(response); + } + + callUnassign(); + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js new file mode 100644 index 00000000000..f425b0897af --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/license_management_service.update_license_pool.js @@ -0,0 +1,69 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(licensePool, updateMask) { + // [START cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 license pool to update. + * The license pool's name field is used to identify the license pool to + * update. Format: + * `billingAccounts/{billing_account}/orders/{order}/licensePool`. + */ + // const licensePool = {} + /** + * Required. The list of fields to update. + */ + // const updateMask = {} + + // Imports the Procurement library + const {LicenseManagementServiceClient} = require('@google-cloud/procurement').v1; + + // Instantiates a client + const procurementClient = new LicenseManagementServiceClient(); + + async function callUpdateLicensePool() { + // Construct request + const request = { + licensePool, + updateMask, + }; + + // Run request + const response = await procurementClient.updateLicensePool(request); + console.log(response); + } + + callUpdateLicensePool(); + // [END cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index b16619cf711..4d03e85b8b1 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -154,6 +154,326 @@ } } } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async", + "title": "ConsumerProcurementService modifyOrder Sample", + "origin": "API_DEFINITION", + "description": " Modifies an existing [Order][google.cloud.commerce.consumer.procurement.v1.Order] resource.", + "canonical": true, + "file": "consumer_procurement_service.modify_order.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ModifyOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "modifications", + "type": "TYPE_MESSAGE[]" + }, + { + "name": "display_name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConsumerProcurementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementServiceClient" + }, + "method": { + "shortName": "ModifyOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.ModifyOrder", + "service": { + "shortName": "ConsumerProcurementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService" + } + } + } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async", + "title": "ConsumerProcurementService cancelOrder Sample", + "origin": "API_DEFINITION", + "description": " Cancels an existing [Order][google.cloud.commerce.consumer.procurement.v1.Order]. Every product procured in the Order will be cancelled.", + "canonical": true, + "file": "consumer_procurement_service.cancel_order.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CancelOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + }, + { + "name": "etag", + "type": "TYPE_STRING" + }, + { + "name": "cancellation_policy", + "type": ".google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ConsumerProcurementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementServiceClient" + }, + "method": { + "shortName": "CancelOrder", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService.CancelOrder", + "service": { + "shortName": "ConsumerProcurementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.ConsumerProcurementService" + } + } + } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async", + "title": "ConsumerProcurementService getLicensePool Sample", + "origin": "API_DEFINITION", + "description": " Gets the license pool.", + "canonical": true, + "file": "license_management_service.get_license_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePool", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.commerce.consumer.procurement.v1.LicensePool", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "GetLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.GetLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async", + "title": "ConsumerProcurementService updateLicensePool Sample", + "origin": "API_DEFINITION", + "description": " Updates the license pool if one exists for this Order.", + "canonical": true, + "file": "license_management_service.update_license_pool.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 61, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "UpdateLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePool", + "async": true, + "parameters": [ + { + "name": "license_pool", + "type": ".google.cloud.commerce.consumer.procurement.v1.LicensePool" + }, + { + "name": "update_mask", + "type": ".google.protobuf.FieldMask" + } + ], + "resultType": ".google.cloud.commerce.consumer.procurement.v1.LicensePool", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "UpdateLicensePool", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.UpdateLicensePool", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async", + "title": "ConsumerProcurementService assign Sample", + "origin": "API_DEFINITION", + "description": " Assigns a license to a user.", + "canonical": true, + "file": "license_management_service.assign.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Assign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "usernames", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.commerce.consumer.procurement.v1.AssignResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Assign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Assign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async", + "title": "ConsumerProcurementService unassign Sample", + "origin": "API_DEFINITION", + "description": " Unassigns a license from a user.", + "canonical": true, + "file": "license_management_service.unassign.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "Unassign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "usernames", + "type": "TYPE_STRING[]" + } + ], + "resultType": ".google.cloud.commerce.consumer.procurement.v1.UnassignResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "Unassign", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.Unassign", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + } + }, + { + "regionTag": "cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async", + "title": "ConsumerProcurementService enumerateLicensedUsers Sample", + "origin": "API_DEFINITION", + "description": " Enumerates all users assigned a license.", + "canonical": true, + "file": "license_management_service.enumerate_licensed_users.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 65, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "EnumerateLicensedUsers", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersResponse", + "client": { + "shortName": "LicenseManagementServiceClient", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementServiceClient" + }, + "method": { + "shortName": "EnumerateLicensedUsers", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService.EnumerateLicensedUsers", + "service": { + "shortName": "LicenseManagementService", + "fullName": "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService" + } + } + } } ] } \ No newline at end of file diff --git a/packages/google-cloud-commerce-consumer-procurement/src/index.ts b/packages/google-cloud-commerce-consumer-procurement/src/index.ts index 9691cba4711..e814716be57 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/index.ts +++ b/packages/google-cloud-commerce-consumer-procurement/src/index.ts @@ -21,8 +21,20 @@ import * as v1alpha1 from './v1alpha1'; const ConsumerProcurementServiceClient = v1.ConsumerProcurementServiceClient; type ConsumerProcurementServiceClient = v1.ConsumerProcurementServiceClient; +const LicenseManagementServiceClient = v1.LicenseManagementServiceClient; +type LicenseManagementServiceClient = v1.LicenseManagementServiceClient; -export {v1, v1alpha1, ConsumerProcurementServiceClient}; -export default {v1, v1alpha1, ConsumerProcurementServiceClient}; +export { + v1, + v1alpha1, + ConsumerProcurementServiceClient, + LicenseManagementServiceClient, +}; +export default { + v1, + v1alpha1, + ConsumerProcurementServiceClient, + LicenseManagementServiceClient, +}; import * as protos from '../protos/protos'; export {protos}; diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts index 56bf2721b59..7abf4ef00f3 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client.ts @@ -216,6 +216,9 @@ export class ConsumerProcurementServiceClient { billingAccountPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}' ), + licensePoolPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/orders/{order}/licensePool' + ), orderPathTemplate: new this._gaxModule.PathTemplate( 'billingAccounts/{billing_account}/orders/{order}' ), @@ -258,6 +261,18 @@ export class ConsumerProcurementServiceClient { const placeOrderMetadata = protoFilesRoot.lookup( '.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata' ) as gax.protobuf.Type; + const modifyOrderResponse = protoFilesRoot.lookup( + '.google.cloud.commerce.consumer.procurement.v1.Order' + ) as gax.protobuf.Type; + const modifyOrderMetadata = protoFilesRoot.lookup( + '.google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata' + ) as gax.protobuf.Type; + const cancelOrderResponse = protoFilesRoot.lookup( + '.google.cloud.commerce.consumer.procurement.v1.Order' + ) as gax.protobuf.Type; + const cancelOrderMetadata = protoFilesRoot.lookup( + '.google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { placeOrder: new this._gaxModule.LongrunningDescriptor( @@ -265,6 +280,16 @@ export class ConsumerProcurementServiceClient { placeOrderResponse.decode.bind(placeOrderResponse), placeOrderMetadata.decode.bind(placeOrderMetadata) ), + modifyOrder: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + modifyOrderResponse.decode.bind(modifyOrderResponse), + modifyOrderMetadata.decode.bind(modifyOrderMetadata) + ), + cancelOrder: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + cancelOrderResponse.decode.bind(cancelOrderResponse), + cancelOrderMetadata.decode.bind(cancelOrderMetadata) + ), }; // Put together the default options sent with requests. @@ -321,6 +346,8 @@ export class ConsumerProcurementServiceClient { 'placeOrder', 'getOrder', 'listOrders', + 'modifyOrder', + 'cancelOrder', ]; for (const methodName of consumerProcurementServiceStubMethods) { const callPromise = this.consumerProcurementServiceStub.then( @@ -561,7 +588,7 @@ export class ConsumerProcurementServiceClient { * @param {string} [request.requestId] * Optional. A unique identifier for this request. * The server will ignore subsequent requests that provide a duplicate request - * ID for at least 120 minutes after the first request. + * ID for at least 24 hours after the first request. * * The request ID must be a valid * [UUID](https://en.wikipedia.org/wiki/Universally_unique_identifier#Format). @@ -694,6 +721,298 @@ export class ConsumerProcurementServiceClient { protos.google.cloud.commerce.consumer.procurement.v1.PlaceOrderMetadata >; } + /** + * Modifies an existing + * {@link protos.google.cloud.commerce.consumer.procurement.v1.Order|Order} resource. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. Name of the order to update. + * @param {number[]} [request.modifications] + * Optional. Modifications for an existing Order created by an Offer. + * Required when Offer based Order is being modified, except for when going + * from an offer to a public plan. + * @param {string} [request.displayName] + * Optional. Updated display name of the order, leave as empty if you do not + * want to update current display name. + * @param {string} [request.etag] + * Optional. The weak etag, which can be optionally populated, of the order + * that this modify request is based on. Validation checking will only happen + * if the invoker supplies this field. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/consumer_procurement_service.modify_order.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async + */ + modifyOrder( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + modifyOrder( + request: protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + modifyOrder( + request: protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, + callback: Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + modifyOrder( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.modifyOrder(request, options, callback); + } + /** + * Check the status of the long running operation returned by `modifyOrder()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/consumer_procurement_service.modify_order.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_ModifyOrder_async + */ + async checkModifyOrderProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.Order, + protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + > + > { + 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.modifyOrder, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.Order, + protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderMetadata + >; + } + /** + * Cancels an existing + * {@link protos.google.cloud.commerce.consumer.procurement.v1.Order|Order}. Every product + * procured in the Order will be cancelled. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The resource name of the order. + * @param {string} [request.etag] + * Optional. The weak etag, which can be optionally populated, of the order + * that this cancel request is based on. Validation checking will only happen + * if the invoker supplies this field. + * @param {google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest.CancellationPolicy} [request.cancellationPolicy] + * Optional. Cancellation policy of this request. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/consumer_procurement_service.cancel_order.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async + */ + cancelOrder( + request?: protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + cancelOrder( + request: protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + cancelOrder( + request: protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, + callback: Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + cancelOrder( + request?: protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.cancelOrder(request, options, callback); + } + /** + * Check the status of the long running operation returned by `cancelOrder()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/consumer_procurement_service.cancel_order.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_ConsumerProcurementService_CancelOrder_async + */ + async checkCancelOrderProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.Order, + protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + > + > { + 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.cancelOrder, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.Order, + protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderMetadata + >; + } /** * Lists {@link protos.google.cloud.commerce.consumer.procurement.v1.Order|Order} * resources that the user has access to, within the scope of the parent @@ -718,6 +1037,7 @@ export class ConsumerProcurementServiceClient { * * * `display_name` * + * * If the query contains special characters other than letters, * underscore, or digits, the phrase must be quoted with double quotes. For * example, `display_name="foo:bar"`, where the display name needs to be @@ -834,6 +1154,7 @@ export class ConsumerProcurementServiceClient { * * * `display_name` * + * * If the query contains special characters other than letters, * underscore, or digits, the phrase must be quoted with double quotes. For * example, `display_name="foo:bar"`, where the display name needs to be @@ -898,6 +1219,7 @@ export class ConsumerProcurementServiceClient { * * * `display_name` * + * * If the query contains special characters other than letters, * underscore, or digits, the phrase must be quoted with double quotes. For * example, `display_name="foo:bar"`, where the display name needs to be @@ -1143,6 +1465,44 @@ export class ConsumerProcurementServiceClient { ).billing_account; } + /** + * Return a fully-qualified licensePool resource name string. + * + * @param {string} billing_account + * @param {string} order + * @returns {string} Resource name string. + */ + licensePoolPath(billingAccount: string, order: string) { + return this.pathTemplates.licensePoolPathTemplate.render({ + billing_account: billingAccount, + order: order, + }); + } + + /** + * Parse the billing_account from LicensePool resource. + * + * @param {string} licensePoolName + * A fully-qualified path representing LicensePool resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromLicensePoolName(licensePoolName: string) { + return this.pathTemplates.licensePoolPathTemplate.match(licensePoolName) + .billing_account; + } + + /** + * Parse the order from LicensePool resource. + * + * @param {string} licensePoolName + * A fully-qualified path representing LicensePool resource. + * @returns {string} A string representing the order. + */ + matchOrderFromLicensePoolName(licensePoolName: string) { + return this.pathTemplates.licensePoolPathTemplate.match(licensePoolName) + .order; + } + /** * Return a fully-qualified order resource name string. * diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client_config.json b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client_config.json index 36fe3631eb3..63b0de70aa1 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client_config.json +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_client_config.json @@ -46,6 +46,14 @@ "timeout_millis": 60000, "retry_codes_name": "unavailable", "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ModifyOrder": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "CancelOrder": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" } } } diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_proto_list.json b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_proto_list.json index 5a21ff4775a..ed065e17411 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_proto_list.json +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/consumer_procurement_service_proto_list.json @@ -1,4 +1,5 @@ [ + "../../protos/google/cloud/commerce/consumer/procurement/v1/license_management_service.proto", "../../protos/google/cloud/commerce/consumer/procurement/v1/order.proto", "../../protos/google/cloud/commerce/consumer/procurement/v1/procurement_service.proto" ] diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/gapic_metadata.json b/packages/google-cloud-commerce-consumer-procurement/src/v1/gapic_metadata.json index f02fe43c2e6..6b5fab684df 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/gapic_metadata.json +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/gapic_metadata.json @@ -20,6 +20,16 @@ "placeOrder" ] }, + "ModifyOrder": { + "methods": [ + "modifyOrder" + ] + }, + "CancelOrder": { + "methods": [ + "cancelOrder" + ] + }, "ListOrders": { "methods": [ "listOrders", @@ -42,6 +52,16 @@ "placeOrder" ] }, + "ModifyOrder": { + "methods": [ + "modifyOrder" + ] + }, + "CancelOrder": { + "methods": [ + "cancelOrder" + ] + }, "ListOrders": { "methods": [ "listOrders", @@ -52,6 +72,74 @@ } } } + }, + "LicenseManagementService": { + "clients": { + "grpc": { + "libraryClient": "LicenseManagementServiceClient", + "rpcs": { + "GetLicensePool": { + "methods": [ + "getLicensePool" + ] + }, + "UpdateLicensePool": { + "methods": [ + "updateLicensePool" + ] + }, + "Assign": { + "methods": [ + "assign" + ] + }, + "Unassign": { + "methods": [ + "unassign" + ] + }, + "EnumerateLicensedUsers": { + "methods": [ + "enumerateLicensedUsers", + "enumerateLicensedUsersStream", + "enumerateLicensedUsersAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "LicenseManagementServiceClient", + "rpcs": { + "GetLicensePool": { + "methods": [ + "getLicensePool" + ] + }, + "UpdateLicensePool": { + "methods": [ + "updateLicensePool" + ] + }, + "Assign": { + "methods": [ + "assign" + ] + }, + "Unassign": { + "methods": [ + "unassign" + ] + }, + "EnumerateLicensedUsers": { + "methods": [ + "enumerateLicensedUsers", + "enumerateLicensedUsersStream", + "enumerateLicensedUsersAsync" + ] + } + } + } + } } } } diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/index.ts b/packages/google-cloud-commerce-consumer-procurement/src/v1/index.ts index 99d71a246b2..5d6e7c983c8 100644 --- a/packages/google-cloud-commerce-consumer-procurement/src/v1/index.ts +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/index.ts @@ -17,3 +17,4 @@ // ** All changes to this file may be overwritten. ** export {ConsumerProcurementServiceClient} from './consumer_procurement_service_client'; +export {LicenseManagementServiceClient} from './license_management_service_client'; diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts new file mode 100644 index 00000000000..aa5ec982dcb --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client.ts @@ -0,0 +1,1081 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1/license_management_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './license_management_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service for managing licenses. + * @class + * @memberof v1 + */ +export class LicenseManagementServiceClient { + 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; + 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}; + licenseManagementServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of LicenseManagementServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [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 LicenseManagementServiceClient({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 LicenseManagementServiceClient; + 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 = + 'cloudcommerceconsumerprocurement.' + 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 = { + licensePoolPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/orders/{order}/licensePool' + ), + orderPathTemplate: new this._gaxModule.PathTemplate( + 'billingAccounts/{billing_account}/orders/{order}' + ), + }; + + // 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 = { + enumerateLicensedUsers: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'licensedUsers' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.cloud.commerce.consumer.procurement.v1.LicenseManagementService', + 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.licenseManagementServiceStub) { + return this.licenseManagementServiceStub; + } + + // Put together the "service stub" for + // google.cloud.commerce.consumer.procurement.v1.LicenseManagementService. + this.licenseManagementServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.cloud.commerce.consumer.procurement.v1.LicenseManagementService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.cloud.commerce.consumer.procurement.v1 + .LicenseManagementService, + 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 licenseManagementServiceStubMethods = [ + 'getLicensePool', + 'updateLicensePool', + 'assign', + 'unassign', + 'enumerateLicensedUsers', + ]; + for (const methodName of licenseManagementServiceStubMethods) { + const callPromise = this.licenseManagementServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.licenseManagementServiceStub; + } + + /** + * 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 'cloudcommerceconsumerprocurement.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 'cloudcommerceconsumerprocurement.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/cloud-platform']; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Gets the license pool. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the license pool to get. + * Format: `billingAccounts/{billing_account}/orders/{order}/licensePool` + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.commerce.consumer.procurement.v1.LicensePool|LicensePool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/license_management_service.get_license_pool.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_GetLicensePool_async + */ + getLicensePool( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest + | undefined + ), + {} | undefined, + ] + >; + getLicensePool( + request: protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getLicensePool( + request: protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getLicensePool( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IGetLicensePoolRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getLicensePool(request, options, callback); + } + /** + * Updates the license pool if one exists for this Order. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.commerce.consumer.procurement.v1.LicensePool} request.licensePool + * Required. The license pool to update. + * + * The license pool's name field is used to identify the license pool to + * update. Format: + * `billingAccounts/{billing_account}/orders/{order}/licensePool`. + * @param {google.protobuf.FieldMask} request.updateMask + * Required. The list of fields to update. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.commerce.consumer.procurement.v1.LicensePool|LicensePool}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/license_management_service.update_license_pool.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_UpdateLicensePool_async + */ + updateLicensePool( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest + | undefined + ), + {} | undefined, + ] + >; + updateLicensePool( + request: protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateLicensePool( + request: protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest + | null + | undefined, + {} | null | undefined + > + ): void; + updateLicensePool( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + | protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IUpdateLicensePoolRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + 'license_pool.name': request.licensePool!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.updateLicensePool(request, options, callback); + } + /** + * Assigns a license to a user. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. License pool name. + * @param {string[]} request.usernames + * Required. Username. + * Format: `name@domain.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.commerce.consumer.procurement.v1.AssignResponse|AssignResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/license_management_service.assign.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Assign_async + */ + assign( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest + | undefined + ), + {} | undefined, + ] + >; + assign( + request: protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest + | null + | undefined, + {} | null | undefined + > + ): void; + assign( + request: protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest + | null + | undefined, + {} | null | undefined + > + ): void; + assign( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IAssignRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.assign(request, options, callback); + } + /** + * Unassigns a license from a user. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. License pool name. + * @param {string[]} request.usernames + * Required. Username. + * Format: `name@domain.com`. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.commerce.consumer.procurement.v1.UnassignResponse|UnassignResponse}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/license_management_service.unassign.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_Unassign_async + */ + unassign( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest + | undefined + ), + {} | undefined, + ] + >; + unassign( + request: protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest + | null + | undefined, + {} | null | undefined + > + ): void; + unassign( + request: protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, + callback: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest + | null + | undefined, + {} | null | undefined + > + ): void; + unassign( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, + | protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse, + ( + | protos.google.cloud.commerce.consumer.procurement.v1.IUnassignRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.unassign(request, options, callback); + } + + /** + * Enumerates all users assigned a license. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. License pool name. + * @param {number} [request.pageSize] + * Optional. The maximum number of users to return. The service may return + * fewer than this value. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `EnumerateLicensedUsers` + * 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.cloud.commerce.consumer.procurement.v1.LicensedUser|LicensedUser}. + * 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 `enumerateLicensedUsersAsync()` + * 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. + */ + enumerateLicensedUsers( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser[], + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest | null, + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse, + ] + >; + enumerateLicensedUsers( + request: protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + | protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse + | null + | undefined, + protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser + > + ): void; + enumerateLicensedUsers( + request: protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + callback: PaginationCallback< + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + | protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse + | null + | undefined, + protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser + > + ): void; + enumerateLicensedUsers( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + | protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse + | null + | undefined, + protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser + >, + callback?: PaginationCallback< + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + | protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse + | null + | undefined, + protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser + > + ): Promise< + [ + protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser[], + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest | null, + protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.enumerateLicensedUsers( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. License pool name. + * @param {number} [request.pageSize] + * Optional. The maximum number of users to return. The service may return + * fewer than this value. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `EnumerateLicensedUsers` + * 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.cloud.commerce.consumer.procurement.v1.LicensedUser|LicensedUser} 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 `enumerateLicensedUsersAsync()` + * 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. + */ + enumerateLicensedUsersStream( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + 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['enumerateLicensedUsers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.enumerateLicensedUsers.createStream( + this.innerApiCalls.enumerateLicensedUsers as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `enumerateLicensedUsers`, 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. License pool name. + * @param {number} [request.pageSize] + * Optional. The maximum number of users to return. The service may return + * fewer than this value. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous `EnumerateLicensedUsers` + * 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.cloud.commerce.consumer.procurement.v1.LicensedUser|LicensedUser}. The API will be called under the hood as needed, once per the page, + * so you can stop the iteration when you don't need more results. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#auto-pagination | documentation } + * for more details and examples. + * @example include:samples/generated/v1/license_management_service.enumerate_licensed_users.js + * region_tag:cloudcommerceconsumerprocurement_v1_generated_LicenseManagementService_EnumerateLicensedUsers_async + */ + enumerateLicensedUsersAsync( + request?: protos.google.cloud.commerce.consumer.procurement.v1.IEnumerateLicensedUsersRequest, + 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['enumerateLicensedUsers']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.enumerateLicensedUsers.asyncIterate( + this.innerApiCalls['enumerateLicensedUsers'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified licensePool resource name string. + * + * @param {string} billing_account + * @param {string} order + * @returns {string} Resource name string. + */ + licensePoolPath(billingAccount: string, order: string) { + return this.pathTemplates.licensePoolPathTemplate.render({ + billing_account: billingAccount, + order: order, + }); + } + + /** + * Parse the billing_account from LicensePool resource. + * + * @param {string} licensePoolName + * A fully-qualified path representing LicensePool resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromLicensePoolName(licensePoolName: string) { + return this.pathTemplates.licensePoolPathTemplate.match(licensePoolName) + .billing_account; + } + + /** + * Parse the order from LicensePool resource. + * + * @param {string} licensePoolName + * A fully-qualified path representing LicensePool resource. + * @returns {string} A string representing the order. + */ + matchOrderFromLicensePoolName(licensePoolName: string) { + return this.pathTemplates.licensePoolPathTemplate.match(licensePoolName) + .order; + } + + /** + * Return a fully-qualified order resource name string. + * + * @param {string} billing_account + * @param {string} order + * @returns {string} Resource name string. + */ + orderPath(billingAccount: string, order: string) { + return this.pathTemplates.orderPathTemplate.render({ + billing_account: billingAccount, + order: order, + }); + } + + /** + * Parse the billing_account from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the billing_account. + */ + matchBillingAccountFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName) + .billing_account; + } + + /** + * Parse the order from Order resource. + * + * @param {string} orderName + * A fully-qualified path representing Order resource. + * @returns {string} A string representing the order. + */ + matchOrderFromOrderName(orderName: string) { + return this.pathTemplates.orderPathTemplate.match(orderName).order; + } + + /** + * 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.licenseManagementServiceStub && !this._terminated) { + return this.licenseManagementServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client_config.json b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client_config.json new file mode 100644 index 00000000000..3b2129b38aa --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_client_config.json @@ -0,0 +1,46 @@ +{ + "interfaces": { + "google.cloud.commerce.consumer.procurement.v1.LicenseManagementService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetLicensePool": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "UpdateLicensePool": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "Assign": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "Unassign": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + }, + "EnumerateLicensedUsers": { + "retry_codes_name": "non_idempotent", + "retry_params_name": "default" + } + } + } + } +} diff --git a/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_proto_list.json b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_proto_list.json new file mode 100644 index 00000000000..ed065e17411 --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/src/v1/license_management_service_proto_list.json @@ -0,0 +1,5 @@ +[ + "../../protos/google/cloud/commerce/consumer/procurement/v1/license_management_service.proto", + "../../protos/google/cloud/commerce/consumer/procurement/v1/order.proto", + "../../protos/google/cloud/commerce/consumer/procurement/v1/procurement_service.proto" +] diff --git a/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.js b/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.js index 3125dbabcaa..bcfb9094e78 100644 --- a/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.js +++ b/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.js @@ -22,6 +22,8 @@ const procurement = require('@google-cloud/procurement'); function main() { const consumerProcurementServiceClient = new procurement.ConsumerProcurementServiceClient(); + const licenseManagementServiceClient = + new procurement.LicenseManagementServiceClient(); } main(); diff --git a/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.ts b/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.ts index a20db20fff6..9e67e4b5496 100644 --- a/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.ts +++ b/packages/google-cloud-commerce-consumer-procurement/system-test/fixtures/sample/src/index.ts @@ -16,7 +16,10 @@ // ** https://github.com/googleapis/gapic-generator-typescript ** // ** All changes to this file may be overwritten. ** -import {ConsumerProcurementServiceClient} from '@google-cloud/procurement'; +import { + ConsumerProcurementServiceClient, + LicenseManagementServiceClient, +} from '@google-cloud/procurement'; // check that the client class type name can be used function doStuffWithConsumerProcurementServiceClient( @@ -24,12 +27,20 @@ function doStuffWithConsumerProcurementServiceClient( ) { client.close(); } +function doStuffWithLicenseManagementServiceClient( + client: LicenseManagementServiceClient +) { + client.close(); +} function main() { // check that the client instance can be created const consumerProcurementServiceClient = new ConsumerProcurementServiceClient(); doStuffWithConsumerProcurementServiceClient(consumerProcurementServiceClient); + // check that the client instance can be created + const licenseManagementServiceClient = new LicenseManagementServiceClient(); + doStuffWithLicenseManagementServiceClient(licenseManagementServiceClient); } main(); diff --git a/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts b/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts index 49e650069f2..0f88fd07b47 100644 --- a/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts +++ b/packages/google-cloud-commerce-consumer-procurement/test/gapic_consumer_procurement_service_v1.ts @@ -733,6 +733,422 @@ describe('v1.ConsumerProcurementServiceClient', () => { }); }); + describe('modifyOrder', () => { + it('invokes modifyOrder without error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.modifyOrder = stubLongRunningCall(expectedResponse); + const [operation] = await client.modifyOrder(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes modifyOrder without error using callback', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.modifyOrder = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.modifyOrder( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.IModifyOrderMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes modifyOrder with call error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.modifyOrder = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.modifyOrder(request), expectedError); + const actualRequest = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes modifyOrder with LRO error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.ModifyOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.modifyOrder = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.modifyOrder(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.modifyOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkModifyOrderProgress without error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkModifyOrderProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkModifyOrderProgress with error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkModifyOrderProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('cancelOrder', () => { + it('invokes cancelOrder without error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.cancelOrder = stubLongRunningCall(expectedResponse); + const [operation] = await client.cancelOrder(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOrder without error using callback', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.cancelOrder = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.cancelOrder( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.commerce.consumer.procurement.v1.IOrder, + protos.google.cloud.commerce.consumer.procurement.v1.ICancelOrderMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOrder with call error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelOrder = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.cancelOrder(request), expectedError); + const actualRequest = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes cancelOrder with LRO error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.CancelOrderRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.cancelOrder = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.cancelOrder(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.cancelOrder as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkCancelOrderProgress without error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkCancelOrderProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkCancelOrderProgress with error', async () => { + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.checkCancelOrderProgress(''), expectedError); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + describe('listOrders', () => { it('invokes listOrders without error', async () => { const client = @@ -1474,6 +1890,61 @@ describe('v1.ConsumerProcurementServiceClient', () => { }); }); + describe('licensePool', () => { + const fakePath = '/rendered/path/licensePool'; + const expectedParameters = { + billing_account: 'billingAccountValue', + order: 'orderValue', + }; + const client = + new consumerprocurementserviceModule.v1.ConsumerProcurementServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.licensePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.licensePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('licensePoolPath', () => { + const result = client.licensePoolPath( + 'billingAccountValue', + 'orderValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.licensePoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromLicensePoolName', () => { + const result = client.matchBillingAccountFromLicensePoolName(fakePath); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.licensePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchOrderFromLicensePoolName', () => { + const result = client.matchOrderFromLicensePoolName(fakePath); + assert.strictEqual(result, 'orderValue'); + assert( + (client.pathTemplates.licensePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('order', () => { const fakePath = '/rendered/path/order'; const expectedParameters = { diff --git a/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts b/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts new file mode 100644 index 00000000000..73d4825714d --- /dev/null +++ b/packages/google-cloud-commerce-consumer-procurement/test/gapic_license_management_service_v1.ts @@ -0,0 +1,1349 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 licensemanagementserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1.LicenseManagementServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual( + apiEndpoint, + 'cloudcommerceconsumerprocurement.googleapis.com' + ); + }); + + it('has universeDomain', () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient(); + 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 = + licensemanagementserviceModule.v1.LicenseManagementServiceClient + .servicePath; + assert.strictEqual( + servicePath, + 'cloudcommerceconsumerprocurement.googleapis.com' + ); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + licensemanagementserviceModule.v1.LicenseManagementServiceClient + .apiEndpoint; + assert.strictEqual( + apiEndpoint, + 'cloudcommerceconsumerprocurement.googleapis.com' + ); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + universeDomain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'cloudcommerceconsumerprocurement.example.com' + ); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + universe_domain: 'example.com', + }); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'cloudcommerceconsumerprocurement.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 licensemanagementserviceModule.v1.LicenseManagementServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'cloudcommerceconsumerprocurement.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 licensemanagementserviceModule.v1.LicenseManagementServiceClient( + {universeDomain: 'configured.example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'cloudcommerceconsumerprocurement.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 licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + universe_domain: 'example.com', + universeDomain: 'example.net', + }); + }); + }); + + it('has port', () => { + const port = + licensemanagementserviceModule.v1.LicenseManagementServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + fallback: true, + }); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.licenseManagementServiceStub, undefined); + await client.initialize(); + assert(client.licenseManagementServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + assert(client.licenseManagementServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + assert.strictEqual(client.licenseManagementServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + 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 licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + 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('getLicensePool', () => { + it('invokes getLicensePool without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensePool() + ); + client.innerApiCalls.getLicensePool = stubSimpleCall(expectedResponse); + const [response] = await client.getLicensePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLicensePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLicensePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLicensePool without error using callback', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensePool() + ); + client.innerApiCalls.getLicensePool = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getLicensePool( + request, + ( + err?: Error | null, + result?: protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getLicensePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLicensePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLicensePool with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getLicensePool = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getLicensePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getLicensePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getLicensePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getLicensePool with closed client', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.GetLicensePoolRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getLicensePool(request), expectedError); + }); + }); + + describe('updateLicensePool', () => { + it('invokes updateLicensePool without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() + ); + request.licensePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest', + ['licensePool', 'name'] + ); + request.licensePool.name = defaultValue1; + const expectedHeaderRequestParams = `license_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensePool() + ); + client.innerApiCalls.updateLicensePool = stubSimpleCall(expectedResponse); + const [response] = await client.updateLicensePool(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateLicensePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLicensePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLicensePool without error using callback', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() + ); + request.licensePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest', + ['licensePool', 'name'] + ); + request.licensePool.name = defaultValue1; + const expectedHeaderRequestParams = `license_pool.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensePool() + ); + client.innerApiCalls.updateLicensePool = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.updateLicensePool( + request, + ( + err?: Error | null, + result?: protos.google.cloud.commerce.consumer.procurement.v1.ILicensePool | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.updateLicensePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLicensePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLicensePool with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() + ); + request.licensePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest', + ['licensePool', 'name'] + ); + request.licensePool.name = defaultValue1; + const expectedHeaderRequestParams = `license_pool.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.updateLicensePool = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.updateLicensePool(request), expectedError); + const actualRequest = ( + client.innerApiCalls.updateLicensePool as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.updateLicensePool as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes updateLicensePool with closed client', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest() + ); + request.licensePool ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UpdateLicensePoolRequest', + ['licensePool', 'name'] + ); + request.licensePool.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.updateLicensePool(request), expectedError); + }); + }); + + describe('assign', () => { + it('invokes assign without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.AssignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.AssignResponse() + ); + client.innerApiCalls.assign = stubSimpleCall(expectedResponse); + const [response] = await client.assign(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.assign as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.assign as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes assign without error using callback', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.AssignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.AssignResponse() + ); + client.innerApiCalls.assign = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.assign( + request, + ( + err?: Error | null, + result?: protos.google.cloud.commerce.consumer.procurement.v1.IAssignResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = (client.innerApiCalls.assign as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.assign as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes assign with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.AssignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.assign = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.assign(request), expectedError); + const actualRequest = (client.innerApiCalls.assign as SinonStub).getCall( + 0 + ).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.assign as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes assign with closed client', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.AssignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.AssignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.assign(request), expectedError); + }); + }); + + describe('unassign', () => { + it('invokes unassign without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UnassignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UnassignResponse() + ); + client.innerApiCalls.unassign = stubSimpleCall(expectedResponse); + const [response] = await client.unassign(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.unassign as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.unassign as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes unassign without error using callback', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UnassignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UnassignResponse() + ); + client.innerApiCalls.unassign = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.unassign( + request, + ( + err?: Error | null, + result?: protos.google.cloud.commerce.consumer.procurement.v1.IUnassignResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.unassign as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.unassign as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes unassign with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UnassignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.unassign = stubSimpleCall(undefined, expectedError); + await assert.rejects(client.unassign(request), expectedError); + const actualRequest = ( + client.innerApiCalls.unassign as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.unassign as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes unassign with closed client', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.UnassignRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.UnassignRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.unassign(request), expectedError); + }); + }); + + describe('enumerateLicensedUsers', () => { + it('invokes enumerateLicensedUsers without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + ]; + client.innerApiCalls.enumerateLicensedUsers = + stubSimpleCall(expectedResponse); + const [response] = await client.enumerateLicensedUsers(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.enumerateLicensedUsers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enumerateLicensedUsers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes enumerateLicensedUsers without error using callback', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + ]; + client.innerApiCalls.enumerateLicensedUsers = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.enumerateLicensedUsers( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.enumerateLicensedUsers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enumerateLicensedUsers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes enumerateLicensedUsers with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.enumerateLicensedUsers = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.enumerateLicensedUsers(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.enumerateLicensedUsers as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.enumerateLicensedUsers as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes enumerateLicensedUsersStream without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + ]; + client.descriptors.page.enumerateLicensedUsers.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.enumerateLicensedUsersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser + ) => { + 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.enumerateLicensedUsers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.enumerateLicensedUsers, request) + ); + assert( + ( + client.descriptors.page.enumerateLicensedUsers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes enumerateLicensedUsersStream with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.enumerateLicensedUsers.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.enumerateLicensedUsersStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.enumerateLicensedUsers + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.enumerateLicensedUsers, request) + ); + assert( + ( + client.descriptors.page.enumerateLicensedUsers + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with enumerateLicensedUsers without error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.LicensedUser() + ), + ]; + client.descriptors.page.enumerateLicensedUsers.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser[] = + []; + const iterable = client.enumerateLicensedUsersAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.enumerateLicensedUsers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.enumerateLicensedUsers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with enumerateLicensedUsers with error', async () => { + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.commerce.consumer.procurement.v1.EnumerateLicensedUsersRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.enumerateLicensedUsers.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.enumerateLicensedUsersAsync(request); + await assert.rejects(async () => { + const responses: protos.google.cloud.commerce.consumer.procurement.v1.ILicensedUser[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.enumerateLicensedUsers + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.enumerateLicensedUsers + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('licensePool', () => { + const fakePath = '/rendered/path/licensePool'; + const expectedParameters = { + billing_account: 'billingAccountValue', + order: 'orderValue', + }; + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.licensePoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.licensePoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('licensePoolPath', () => { + const result = client.licensePoolPath( + 'billingAccountValue', + 'orderValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.licensePoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromLicensePoolName', () => { + const result = client.matchBillingAccountFromLicensePoolName(fakePath); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.licensePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchOrderFromLicensePoolName', () => { + const result = client.matchOrderFromLicensePoolName(fakePath); + assert.strictEqual(result, 'orderValue'); + assert( + (client.pathTemplates.licensePoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('order', () => { + const fakePath = '/rendered/path/order'; + const expectedParameters = { + billing_account: 'billingAccountValue', + order: 'orderValue', + }; + const client = + new licensemanagementserviceModule.v1.LicenseManagementServiceClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.orderPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.orderPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('orderPath', () => { + const result = client.orderPath('billingAccountValue', 'orderValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.orderPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchBillingAccountFromOrderName', () => { + const result = client.matchBillingAccountFromOrderName(fakePath); + assert.strictEqual(result, 'billingAccountValue'); + assert( + (client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchOrderFromOrderName', () => { + const result = client.matchOrderFromOrderName(fakePath); + assert.strictEqual(result, 'orderValue'); + assert( + (client.pathTemplates.orderPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); From f3060f2fad34867307825e591ae49ad38c221371 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 16:46:34 -0700 Subject: [PATCH 4/8] feat: [contactcenterinsights] Add import / export IssueModel (#5738) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: Add import / export IssueModel feat: Add CMEK InitializeLroSpec feat: Add metadata import to IngestConversations feat: Add sampling to IngestConversations docs: Add a comment for valid `order_by` values in ListConversations docs: Add a comment for valid `update_mask` values in UpdateConversation PiperOrigin-RevId: 683188578 Source-Link: https://github.com/googleapis/googleapis/commit/d0eeab38c8f11c090f05c332f2374b556ae36644 Source-Link: https://github.com/googleapis/googleapis-gen/commit/4d5b300a7249ce24278fbe77c16983a06d6e4a5d Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLWNvbnRhY3RjZW50ZXJpbnNpZ2h0cy8uT3dsQm90LnlhbWwiLCJoIjoiNGQ1YjMwMGE3MjQ5Y2UyNDI3OGZiZTc3YzE2OTgzYTA2ZDZlNGE1ZCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 8 +- .../v1/contact_center_insights.proto | 248 +- .../contactcenterinsights/v1/resources.proto | 105 +- .../protos/protos.d.ts | 2781 +++++-- .../protos/protos.js | 6406 +++++++++++++---- .../protos/protos.json | 409 +- .../samples/README.md | 72 + ...tact_center_insights.export_issue_model.js | 66 + ...act_center_insights.get_encryption_spec.js | 61 + ...tact_center_insights.import_issue_model.js | 72 + ...ct_center_insights.ingest_conversations.js | 7 + ...ter_insights.initialize_encryption_spec.js | 65 + ...tact_center_insights.list_conversations.js | 18 +- ...act_center_insights.update_conversation.js | 14 +- ...google.cloud.contactcenterinsights.v1.json | 190 +- .../src/v1/contact_center_insights_client.ts | 687 +- ...contact_center_insights_client_config.json | 20 + .../src/v1/gapic_metadata.json | 40 + .../test/gapic_contact_center_insights_v1.ts | 1019 ++- 19 files changed, 10317 insertions(+), 1971 deletions(-) create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js create mode 100644 packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js diff --git a/packages/google-cloud-contactcenterinsights/README.md b/packages/google-cloud-contactcenterinsights/README.md index 265ba05d912..106a1c20b18 100644 --- a/packages/google-cloud-contactcenterinsights/README.md +++ b/packages/google-cloud-contactcenterinsights/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Contact Center AI Insights API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -104,14 +104,18 @@ Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/ | Contact_center_insights.delete_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.delete_view.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.deploy_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.deploy_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.export_insights_data | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_insights_data.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.export_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_analysis | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_conversation | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_conversation.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.get_encryption_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_issue | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_phrase_matcher | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_phrase_matcher.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_settings | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_settings.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.get_view | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_view.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.import_issue_model | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.ingest_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js,packages/google-cloud-contactcenterinsights/samples/README.md) | +| Contact_center_insights.initialize_encryption_spec | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_analyses | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_conversations | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js,packages/google-cloud-contactcenterinsights/samples/README.md) | | Contact_center_insights.list_issue_models | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_issue_models.js,packages/google-cloud-contactcenterinsights/samples/README.md) | @@ -196,4 +200,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [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=contactcenterinsights.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto index 59a3e9486f6..f5126da5c7b 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/contact_center_insights.proto @@ -43,6 +43,8 @@ service ContactCenterInsights { "https://www.googleapis.com/auth/cloud-platform"; // Creates a conversation. + // Note that this method does not support audio transcription or redaction. + // Use `conversations.upload` instead. rpc CreateConversation(CreateConversationRequest) returns (Conversation) { option (google.api.http) = { post: "/v1/{parent=projects/*/locations/*}/conversations" @@ -52,8 +54,8 @@ service ContactCenterInsights { "parent,conversation,conversation_id"; } - // Create a longrunning conversation upload operation. This method differs - // from CreateConversation by allowing audio transcription and optional DLP + // Create a long-running conversation upload operation. This method differs + // from `CreateConversation` by allowing audio transcription and optional DLP // redaction. rpc UploadConversation(UploadConversationRequest) returns (google.longrunning.Operation) { @@ -281,6 +283,34 @@ service ContactCenterInsights { }; } + // Exports an issue model to the provided destination. + rpc ExportIssueModel(ExportIssueModelRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{name=projects/*/locations/*/issueModels/*}:export" + body: "*" + }; + option (google.api.method_signature) = "name"; + option (google.longrunning.operation_info) = { + response_type: "ExportIssueModelResponse" + metadata_type: "ExportIssueModelMetadata" + }; + } + + // Imports an issue model from a Cloud Storage bucket. + rpc ImportIssueModel(ImportIssueModelRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{parent=projects/*/locations/*}/issueModels:import" + body: "*" + }; + option (google.api.method_signature) = "parent"; + option (google.longrunning.operation_info) = { + response_type: "ImportIssueModelResponse" + metadata_type: "ImportIssueModelMetadata" + }; + } + // Gets an issue. rpc GetIssue(GetIssueRequest) returns (Issue) { option (google.api.http) = { @@ -392,6 +422,32 @@ service ContactCenterInsights { option (google.api.method_signature) = "settings,update_mask"; } + // Gets location-level encryption key specification. + rpc GetEncryptionSpec(GetEncryptionSpecRequest) returns (EncryptionSpec) { + option (google.api.http) = { + get: "/v1/{name=projects/*/locations/*/encryptionSpec}" + }; + option (google.api.method_signature) = "name"; + } + + // Initializes a location-level encryption key specification. An error will + // be thrown if the location has resources already created before the + // initialization. Once the encryption specification is initialized at a + // location, it is immutable and all newly created resources under the + // location will be encrypted with the existing specification. + rpc InitializeEncryptionSpec(InitializeEncryptionSpecRequest) + returns (google.longrunning.Operation) { + option (google.api.http) = { + post: "/v1/{encryption_spec.name=projects/*/locations/*/encryptionSpec}:initialize" + body: "*" + }; + option (google.api.method_signature) = "encryption_spec"; + option (google.longrunning.operation_info) = { + response_type: "InitializeEncryptionSpecResponse" + metadata_type: "InitializeEncryptionSpecMetadata" + }; + } + // Creates a view. rpc CreateView(CreateViewRequest) returns (View) { option (google.api.http) = { @@ -596,7 +652,7 @@ message UploadConversationRequest { SpeechConfig speech_config = 11 [(google.api.field_behavior) = OPTIONAL]; } -// The metadata for an UploadConversation operation. +// The metadata for an `UploadConversation` operation. message UploadConversationMetadata { // Output only. The time the operation was created. google.protobuf.Timestamp create_time = 1 @@ -630,7 +686,7 @@ message ListConversationsRequest { ]; // The maximum number of conversations to return in the response. A valid page - // size ranges from 0 to 1,000 inclusive. If the page size is zero or + // size ranges from 0 to 100,000 inclusive. If the page size is zero or // unspecified, a default page size of 100 will be chosen. Note that a call // might return fewer results than the requested page size. int32 page_size = 2; @@ -644,6 +700,23 @@ message ListConversationsRequest { // conversations with specific properties. string filter = 4; + // Optional. The attribute by which to order conversations in the response. + // If empty, conversations will be ordered by descending creation time. + // Supported values are one of the following: + // + // * create_time + // * customer_satisfaction_rating + // * duration + // * latest_analysis + // * start_time + // * turn_count + // + // The default sort order is ascending. To specify order, append `asc` or + // `desc` (`create_time desc`). + // For more details, see [Google AIPs + // Ordering](https://google.aip.dev/132#ordering). + string order_by = 7 [(google.api.field_behavior) = OPTIONAL]; + // The level of details of the conversation. Default is `BASIC`. ConversationView view = 5; } @@ -678,7 +751,20 @@ message UpdateConversationRequest { // Required. The new values for the conversation. Conversation conversation = 1 [(google.api.field_behavior) = REQUIRED]; - // The list of fields to be updated. + // The list of fields to be updated. All possible fields can be updated by + // passing `*`, or a subset of the following updateable fields can be + // provided: + // + // * `agent_id` + // * `language_code` + // * `labels` + // * `metadata` + // * `quality_metadata` + // * `call_metadata` + // * `start_time` + // * `expire_time` or `ttl` + // * `data_source.gcs_source.audio_uri` or + // `data_source.dialogflow_source.audio_uri` google.protobuf.FieldMask update_mask = 2; } @@ -719,6 +805,23 @@ message IngestConversationsRequest { // Optional. Specifies the type of the objects in `bucket_uri`. BucketObjectType bucket_object_type = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. The Cloud Storage path to the conversation metadata. Note that: + // [1] Metadata files are expected to be in JSON format. + // [2] Metadata and source files (transcripts or audio) must be in + // separate buckets. + // [3] A source file and its corresponding metadata file must share the same + // name to + // be properly ingested, E.g. `gs://bucket/audio/conversation1.mp3` and + // `gs://bucket/metadata/conversation1.json`. + optional string metadata_bucket_uri = 3 + [(google.api.field_behavior) = OPTIONAL]; + + // Optional. Custom keys to extract as conversation labels from metadata + // files in `metadata_bucket_uri`. Keys not included in this field will be + // ignored. Note that there is a limit of 20 labels per conversation. + repeated string custom_metadata_keys = 12 + [(google.api.field_behavior) = OPTIONAL]; } // Configuration for processing transcript objects. @@ -729,9 +832,11 @@ message IngestConversationsRequest { // Configuration that applies to all conversations. message ConversationConfig { - // An opaque, user-specified string representing the human agent who handled - // the conversations. - string agent_id = 1; + // Optional. An opaque, user-specified string representing a human agent who + // handled all conversations in the import. Note that this will be + // overridden if per-conversation metadata is provided through the + // `metadata_bucket_uri`. + string agent_id = 1 [(google.api.field_behavior) = OPTIONAL]; // Optional. Indicates which of the channels, 1 or 2, contains the agent. // Note that this must be set for conversations to be properly displayed and @@ -776,6 +881,12 @@ message IngestConversationsRequest { // Optional. Default Speech-to-Text configuration. Optional, will default to // the config specified in Settings. SpeechConfig speech_config = 6 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. If set, this fields indicates the number of objects to ingest + // from the Cloud Storage bucket. If empty, the entire bucket will be + // ingested. Unless they are first deleted, conversations produced through + // sampling won't be ingested by subsequent ingest requests. + optional int32 sample_size = 7 [(google.api.field_behavior) = OPTIONAL]; } // The metadata for an IngestConversations operation. @@ -1226,6 +1337,85 @@ message UndeployIssueModelMetadata { UndeployIssueModelRequest request = 3; } +// Request to export an issue model. +message ExportIssueModelRequest { + // Google Cloud Storage Object URI to save the issue model to. + message GcsDestination { + // Required. Format: `gs:///` + string object_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof Destination { + // Google Cloud Storage URI to export the issue model to. + GcsDestination gcs_destination = 2; + } + + // Required. The issue model to export. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/IssueModel" + } + ]; +} + +// Response from export issue model +message ExportIssueModelResponse {} + +// Metadata used for export issue model. +message ExportIssueModelMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // The original export request. + ExportIssueModelRequest request = 3; +} + +// Request to import an issue model. +message ImportIssueModelRequest { + // Google Cloud Storage Object URI to get the issue model file from. + message GcsSource { + // Required. Format: `gs:///` + string object_uri = 1 [(google.api.field_behavior) = REQUIRED]; + } + + oneof Source { + // Google Cloud Storage source message. + GcsSource gcs_source = 2; + } + + // Required. The parent resource of the issue model. + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "locations.googleapis.com/Location" + } + ]; + + // Optional. If set to true, will create an issue model from the imported file + // with randomly generated IDs for the issue model and corresponding issues. + // Otherwise, replaces an existing model with the same ID as the file. + bool create_new_model = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response from import issue model +message ImportIssueModelResponse {} + +// Metadata used for import issue model. +message ImportIssueModelMetadata { + // The time the operation was created. + google.protobuf.Timestamp create_time = 1; + + // The time the operation finished running. + google.protobuf.Timestamp end_time = 2; + + // The original import request. + ImportIssueModelRequest request = 3; +} + // The request to get an issue. message GetIssueRequest { // Required. The name of the issue to get. @@ -1397,6 +1587,48 @@ message UpdateSettingsRequest { [(google.api.field_behavior) = REQUIRED]; } +// The request to get location-level encryption specification. +message GetEncryptionSpecRequest { + // Required. The name of the encryption spec resource to get. + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "contactcenterinsights.googleapis.com/EncryptionSpec" + } + ]; +} + +// The request to initialize a location-level encryption specification. +message InitializeEncryptionSpecRequest { + // Required. The encryption spec used for CMEK encryption. It is required that + // the kms key is in the same region as the endpoint. The same key will be + // used for all provisioned resources, if encryption is available. If the + // kms_key_name is left empty, no encryption will be enforced. + EncryptionSpec encryption_spec = 1 [(google.api.field_behavior) = REQUIRED]; +} + +// The response to initialize a location-level encryption specification. +message InitializeEncryptionSpecResponse {} + +// Metadata for initializing a location-level encryption specification. +message InitializeEncryptionSpecMetadata { + // Output only. The time the operation was created. + google.protobuf.Timestamp create_time = 1 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The time the operation finished running. + google.protobuf.Timestamp end_time = 2 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The original request for initialization. + InitializeEncryptionSpecRequest request = 3 + [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Partial errors during initialising operation that might cause the operation + // output to be incomplete. + repeated google.rpc.Status partial_errors = 4; +} + // The request to create a view. message CreateViewRequest { // Required. The parent resource of the view. Required. The location to create diff --git a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto index a8011eb3f58..d93ee3f2633 100644 --- a/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto +++ b/packages/google-cloud-contactcenterinsights/protos/google/cloud/contactcenterinsights/v1/resources.proto @@ -222,6 +222,11 @@ message Conversation { // Conversation metadata related to quality management. QualityMetadata quality_metadata = 24; + // Input only. JSON Metadata encoded as a string. + // This field is primarily used by Insights integrations with various telphony + // systems and must be in one of Insights' supported formats. + string metadata_json = 25 [(google.api.field_behavior) = INPUT_ONLY]; + // Output only. The conversation transcript. Transcript transcript = 8 [(google.api.field_behavior) = OUTPUT_ONLY]; @@ -338,6 +343,9 @@ message AnalysisResult { // Overall conversation-level sentiment for each channel of the call. repeated ConversationLevelSentiment sentiments = 4; + // Overall conversation-level silence during the call. + ConversationLevelSilence silence = 11; + // All the matched intents in the call. map intents = 6; @@ -379,6 +387,15 @@ message ConversationLevelSentiment { SentimentData sentiment_data = 2; } +// Conversation-level silence data. +message ConversationLevelSilence { + // Amount of time calculated to be in silence. + google.protobuf.Duration silence_duration = 1; + + // Percentage of the total conversation spent in silence. + float silence_percentage = 2; +} + // Information about the issue. message IssueAssignment { // Resource name of the assigned issue. @@ -766,6 +783,9 @@ message Issue { // match to this issue. repeated string sample_utterances = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Representative description of the issue. + string display_description = 14; } // Aggregated statistics about an issue model. @@ -916,7 +936,12 @@ message ExactMatchConfig { bool case_sensitive = 1; } -// The settings resource. +// The CCAI Insights project wide settings. +// Use these settings to configure the behavior of Insights. +// View these settings with +// [`getsettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/getSettings) +// and change the settings with +// [`updateSettings`](https://cloud.google.com/contact-center/insights/docs/reference/rest/v1/projects.locations/updateSettings). message Settings { option (google.api.resource) = { type: "contactcenterinsights.googleapis.com/Settings" @@ -972,8 +997,11 @@ message Settings { // * "create-analysis": Notify each time an analysis is created. // * "create-conversation": Notify each time a conversation is created. // * "export-insights-data": Notify each time an export is complete. + // * "ingest-conversations": Notify each time an IngestConversations LRO is + // complete. // * "update-conversation": Notify each time a conversation is updated via // UpdateConversation. + // * "upload-conversation": Notify when an UploadConversation LRO is complete. // // Values are Pub/Sub topics. The format of each Pub/Sub topic is: // projects/{project}/topics/{topic} @@ -983,15 +1011,47 @@ message Settings { AnalysisConfig analysis_config = 7; // Default DLP redaction resources to be applied while ingesting - // conversations. + // conversations. This applies to conversations ingested from the + // `UploadConversation` and `IngestConversations` endpoints, including + // conversations coming from CCAI Platform. RedactionConfig redaction_config = 10; - // Optional. Default Speech-to-Text resources to be used while ingesting audio - // files. Optional, CCAI Insights will create a default if not provided. + // Optional. Default Speech-to-Text resources to use while ingesting audio + // files. Optional, CCAI Insights will create a default if not provided. This + // applies to conversations ingested from the `UploadConversation` and + // `IngestConversations` endpoints, including conversations coming from CCAI + // Platform. SpeechConfig speech_config = 11 [(google.api.field_behavior) = OPTIONAL]; } +// A customer-managed encryption key specification that can be applied to all +// created resources (e.g. Conversation). +message EncryptionSpec { + option (google.api.resource) = { + type: "contactcenterinsights.googleapis.com/EncryptionSpec" + pattern: "projects/{project}/locations/{location}/encryptionSpec" + }; + + // Immutable. The resource name of the encryption key specification resource. + // Format: + // projects/{project}/locations/{location}/encryptionSpec + string name = 1 [(google.api.field_behavior) = IMMUTABLE]; + + // Required. The name of customer-managed encryption key that is used to + // secure a resource and its sub-resources. If empty, the resource is secured + // by the default Google encryption key. Only the key in the same location as + // this resource is allowed to be used for encryption. Format: + // `projects/{project}/locations/{location}/keyRings/{keyRing}/cryptoKeys/{key}` + string kms_key = 2 [(google.api.field_behavior) = REQUIRED]; +} + // DLP resources used for redaction while ingesting conversations. +// DLP settings are applied to conversations ingested from the +// `UploadConversation` and `IngestConversations` endpoints, including +// conversation coming from CCAI Platform. They are not applied to conversations +// ingested from the `CreateConversation` endpoint or the Dialogflow / Agent +// Assist runtime integrations. When using Dialogflow / Agent Assist runtime +// integrations, redaction should be performed in Dialogflow / Agent Assist. message RedactionConfig { // The fully-qualified DLP deidentify template resource name. // Format: @@ -1005,6 +1065,10 @@ message RedactionConfig { } // Speech-to-Text configuration. +// Speech-to-Text settings are applied to conversations ingested from the +// `UploadConversation` and `IngestConversations` endpoints, including +// conversation coming from CCAI Platform. They are not applied to conversations +// ingested from the `CreateConversation` endpoint. message SpeechConfig { // The fully-qualified Speech Recognizer resource name. // Format: @@ -1016,6 +1080,33 @@ message SpeechConfig { // An annotation that was generated during the customer and agent interaction. message RuntimeAnnotation { + // Explicit input used for generating the answer + message UserInput { + // The source of the query. + enum QuerySource { + // Unknown query source. + QUERY_SOURCE_UNSPECIFIED = 0; + + // The query is from agents. + AGENT_QUERY = 1; + + // The query is a query from previous suggestions, e.g. from a preceding + // SuggestKnowledgeAssist response. + SUGGESTED_QUERY = 2; + } + + // Query text. Article Search uses this to store the input query used + // to generate the search results. + string query = 1; + + // The resource name of associated generator. Format: + // `projects//locations//generators/` + string generator_name = 2; + + // Query source for the answer. + QuerySource query_source = 3; + } + // The data in the annotation. oneof data { // Agent Assist Article Suggestion data. @@ -1054,6 +1145,9 @@ message RuntimeAnnotation { // The feedback that the customer has about the answer in `data`. AnswerFeedback answer_feedback = 5; + + // Explicit input used for generating the answer + UserInput user_input = 16; } // The feedback that the customer has about a certain answer in the @@ -1301,6 +1395,9 @@ message AnnotatorSelector { // The CCAI baseline model. BASELINE_MODEL = 1; + + // The CCAI baseline model, V2.0. + BASELINE_MODEL_V2_0 = 2; } // Summarization must use either a preexisting conversation profile or one diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts index 3a74c348c2f..36805388d20 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.d.ts +++ b/packages/google-cloud-contactcenterinsights/protos/protos.d.ts @@ -340,6 +340,34 @@ export namespace google { */ public undeployIssueModel(request: google.cloud.contactcenterinsights.v1.IUndeployIssueModelRequest): Promise; + /** + * Calls ExportIssueModel. + * @param request ExportIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public exportIssueModel(request: google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportIssueModelCallback): void; + + /** + * Calls ExportIssueModel. + * @param request ExportIssueModelRequest message or plain object + * @returns Promise + */ + public exportIssueModel(request: google.cloud.contactcenterinsights.v1.IExportIssueModelRequest): Promise; + + /** + * Calls ImportIssueModel. + * @param request ImportIssueModelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public importIssueModel(request: google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.ImportIssueModelCallback): void; + + /** + * Calls ImportIssueModel. + * @param request ImportIssueModelRequest message or plain object + * @returns Promise + */ + public importIssueModel(request: google.cloud.contactcenterinsights.v1.IImportIssueModelRequest): Promise; + /** * Calls GetIssue. * @param request GetIssueRequest message or plain object @@ -522,6 +550,34 @@ export namespace google { */ public updateSettings(request: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest): Promise; + /** + * Calls GetEncryptionSpec. + * @param request GetEncryptionSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and EncryptionSpec + */ + public getEncryptionSpec(request: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetEncryptionSpecCallback): void; + + /** + * Calls GetEncryptionSpec. + * @param request GetEncryptionSpecRequest message or plain object + * @returns Promise + */ + public getEncryptionSpec(request: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest): Promise; + + /** + * Calls InitializeEncryptionSpec. + * @param request InitializeEncryptionSpecRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Operation + */ + public initializeEncryptionSpec(request: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, callback: google.cloud.contactcenterinsights.v1.ContactCenterInsights.InitializeEncryptionSpecCallback): void; + + /** + * Calls InitializeEncryptionSpec. + * @param request InitializeEncryptionSpecRequest message or plain object + * @returns Promise + */ + public initializeEncryptionSpec(request: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest): Promise; + /** * Calls CreateView. * @param request CreateViewRequest message or plain object @@ -742,6 +798,20 @@ export namespace google { */ type UndeployIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|exportIssueModel}. + * @param error Error, if any + * @param [response] Operation + */ + type ExportIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|importIssueModel}. + * @param error Error, if any + * @param [response] Operation + */ + type ImportIssueModelCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getIssue}. * @param error Error, if any @@ -833,6 +903,20 @@ export namespace google { */ type UpdateSettingsCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.Settings) => void; + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getEncryptionSpec}. + * @param error Error, if any + * @param [response] EncryptionSpec + */ + type GetEncryptionSpecCallback = (error: (Error|null), response?: google.cloud.contactcenterinsights.v1.EncryptionSpec) => void; + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|initializeEncryptionSpec}. + * @param error Error, if any + * @param [response] Operation + */ + type InitializeEncryptionSpecCallback = (error: (Error|null), response?: google.longrunning.Operation) => void; + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createView}. * @param error Error, if any @@ -1811,6 +1895,9 @@ export namespace google { /** ListConversationsRequest filter */ filter?: (string|null); + /** ListConversationsRequest orderBy */ + orderBy?: (string|null); + /** ListConversationsRequest view */ view?: (google.cloud.contactcenterinsights.v1.ConversationView|keyof typeof google.cloud.contactcenterinsights.v1.ConversationView|null); } @@ -1836,6 +1923,9 @@ export namespace google { /** ListConversationsRequest filter. */ public filter: string; + /** ListConversationsRequest orderBy. */ + public orderBy: string; + /** ListConversationsRequest view. */ public view: (google.cloud.contactcenterinsights.v1.ConversationView|keyof typeof google.cloud.contactcenterinsights.v1.ConversationView); @@ -2349,6 +2439,9 @@ export namespace google { /** IngestConversationsRequest speechConfig */ speechConfig?: (google.cloud.contactcenterinsights.v1.ISpeechConfig|null); + + /** IngestConversationsRequest sampleSize */ + sampleSize?: (number|null); } /** Represents an IngestConversationsRequest. */ @@ -2378,12 +2471,18 @@ export namespace google { /** IngestConversationsRequest speechConfig. */ public speechConfig?: (google.cloud.contactcenterinsights.v1.ISpeechConfig|null); + /** IngestConversationsRequest sampleSize. */ + public sampleSize?: (number|null); + /** IngestConversationsRequest source. */ public source?: "gcsSource"; /** IngestConversationsRequest objectConfig. */ public objectConfig?: "transcriptObjectConfig"; + /** IngestConversationsRequest _sampleSize. */ + public _sampleSize?: "sampleSize"; + /** * Creates a new IngestConversationsRequest instance using the specified properties. * @param [properties] Properties to set @@ -2472,6 +2571,12 @@ export namespace google { /** GcsSource bucketObjectType */ bucketObjectType?: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType|keyof typeof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType|null); + + /** GcsSource metadataBucketUri */ + metadataBucketUri?: (string|null); + + /** GcsSource customMetadataKeys */ + customMetadataKeys?: (string[]|null); } /** Represents a GcsSource. */ @@ -2489,6 +2594,15 @@ export namespace google { /** GcsSource bucketObjectType. */ public bucketObjectType: (google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType|keyof typeof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType); + /** GcsSource metadataBucketUri. */ + public metadataBucketUri?: (string|null); + + /** GcsSource customMetadataKeys. */ + public customMetadataKeys: string[]; + + /** GcsSource _metadataBucketUri. */ + public _metadataBucketUri?: "metadataBucketUri"; + /** * Creates a new GcsSource instance using the specified properties. * @param [properties] Properties to set @@ -6156,1503 +6270,2721 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetIssueRequest. */ - interface IGetIssueRequest { + /** Properties of an ExportIssueModelRequest. */ + interface IExportIssueModelRequest { - /** GetIssueRequest name */ + /** ExportIssueModelRequest gcsDestination */ + gcsDestination?: (google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination|null); + + /** ExportIssueModelRequest name */ name?: (string|null); } - /** Represents a GetIssueRequest. */ - class GetIssueRequest implements IGetIssueRequest { + /** Represents an ExportIssueModelRequest. */ + class ExportIssueModelRequest implements IExportIssueModelRequest { /** - * Constructs a new GetIssueRequest. + * Constructs a new ExportIssueModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IGetIssueRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IExportIssueModelRequest); - /** GetIssueRequest name. */ + /** ExportIssueModelRequest gcsDestination. */ + public gcsDestination?: (google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination|null); + + /** ExportIssueModelRequest name. */ public name: string; + /** ExportIssueModelRequest Destination. */ + public Destination?: "gcsDestination"; + /** - * Creates a new GetIssueRequest instance using the specified properties. + * Creates a new ExportIssueModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetIssueRequest instance + * @returns ExportIssueModelRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IGetIssueRequest): google.cloud.contactcenterinsights.v1.GetIssueRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IExportIssueModelRequest): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest; /** - * Encodes the specified GetIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. - * @param message GetIssueRequest message or plain object to encode + * Encodes the specified ExportIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.verify|verify} messages. + * @param message ExportIssueModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IGetIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. - * @param message GetIssueRequest message or plain object to encode + * Encodes the specified ExportIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.verify|verify} messages. + * @param message ExportIssueModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetIssueRequest message from the specified reader or buffer. + * Decodes an ExportIssueModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetIssueRequest + * @returns ExportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetIssueRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest; /** - * Decodes a GetIssueRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportIssueModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetIssueRequest + * @returns ExportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetIssueRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest; /** - * Verifies a GetIssueRequest message. + * Verifies an ExportIssueModelRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIssueModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetIssueRequest + * @returns ExportIssueModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetIssueRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest; /** - * Creates a plain object from a GetIssueRequest message. Also converts values to other types if specified. - * @param message GetIssueRequest + * Creates a plain object from an ExportIssueModelRequest message. Also converts values to other types if specified. + * @param message ExportIssueModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GetIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetIssueRequest to JSON. + * Converts this ExportIssueModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetIssueRequest + * Gets the default type url for ExportIssueModelRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListIssuesRequest. */ - interface IListIssuesRequest { + namespace ExportIssueModelRequest { - /** ListIssuesRequest parent */ - parent?: (string|null); + /** Properties of a GcsDestination. */ + interface IGcsDestination { + + /** GcsDestination objectUri */ + objectUri?: (string|null); + } + + /** Represents a GcsDestination. */ + class GcsDestination implements IGcsDestination { + + /** + * Constructs a new GcsDestination. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination); + + /** GcsDestination objectUri. */ + public objectUri: string; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsDestination instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.verify|verify} messages. + * @param message GcsDestination message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination; + + /** + * Verifies a GcsDestination message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsDestination + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @param message GcsDestination + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsDestination to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsDestination + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a ListIssuesRequest. */ - class ListIssuesRequest implements IListIssuesRequest { + /** Properties of an ExportIssueModelResponse. */ + interface IExportIssueModelResponse { + } + + /** Represents an ExportIssueModelResponse. */ + class ExportIssueModelResponse implements IExportIssueModelResponse { /** - * Constructs a new ListIssuesRequest. + * Constructs a new ExportIssueModelResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssuesRequest); - - /** ListIssuesRequest parent. */ - public parent: string; + constructor(properties?: google.cloud.contactcenterinsights.v1.IExportIssueModelResponse); /** - * Creates a new ListIssuesRequest instance using the specified properties. + * Creates a new ExportIssueModelResponse instance using the specified properties. * @param [properties] Properties to set - * @returns ListIssuesRequest instance + * @returns ExportIssueModelResponse instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssuesRequest): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IExportIssueModelResponse): google.cloud.contactcenterinsights.v1.ExportIssueModelResponse; /** - * Encodes the specified ListIssuesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. - * @param message ListIssuesRequest message or plain object to encode + * Encodes the specified ExportIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelResponse.verify|verify} messages. + * @param message ExportIssueModelResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListIssuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListIssuesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. - * @param message ListIssuesRequest message or plain object to encode + * Encodes the specified ExportIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelResponse.verify|verify} messages. + * @param message ExportIssueModelResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListIssuesRequest message from the specified reader or buffer. + * Decodes an ExportIssueModelResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListIssuesRequest + * @returns ExportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportIssueModelResponse; /** - * Decodes a ListIssuesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportIssueModelResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListIssuesRequest + * @returns ExportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportIssueModelResponse; /** - * Verifies a ListIssuesRequest message. + * Verifies an ExportIssueModelResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListIssuesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIssueModelResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListIssuesRequest + * @returns ExportIssueModelResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssuesRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportIssueModelResponse; /** - * Creates a plain object from a ListIssuesRequest message. Also converts values to other types if specified. - * @param message ListIssuesRequest + * Creates a plain object from an ExportIssueModelResponse message. Also converts values to other types if specified. + * @param message ExportIssueModelResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListIssuesRequest to JSON. + * Converts this ExportIssueModelResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListIssuesRequest + * Gets the default type url for ExportIssueModelResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListIssuesResponse. */ - interface IListIssuesResponse { + /** Properties of an ExportIssueModelMetadata. */ + interface IExportIssueModelMetadata { - /** ListIssuesResponse issues */ - issues?: (google.cloud.contactcenterinsights.v1.IIssue[]|null); + /** ExportIssueModelMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ExportIssueModelMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ExportIssueModelMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IExportIssueModelRequest|null); } - /** Represents a ListIssuesResponse. */ - class ListIssuesResponse implements IListIssuesResponse { + /** Represents an ExportIssueModelMetadata. */ + class ExportIssueModelMetadata implements IExportIssueModelMetadata { /** - * Constructs a new ListIssuesResponse. + * Constructs a new ExportIssueModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssuesResponse); + constructor(properties?: google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata); - /** ListIssuesResponse issues. */ - public issues: google.cloud.contactcenterinsights.v1.IIssue[]; + /** ExportIssueModelMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ExportIssueModelMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** ExportIssueModelMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IExportIssueModelRequest|null); /** - * Creates a new ListIssuesResponse instance using the specified properties. + * Creates a new ExportIssueModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns ListIssuesResponse instance + * @returns ExportIssueModelMetadata instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssuesResponse): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + public static create(properties?: google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata): google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata; /** - * Encodes the specified ListIssuesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. - * @param message ListIssuesResponse message or plain object to encode + * Encodes the specified ExportIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.verify|verify} messages. + * @param message ExportIssueModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListIssuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListIssuesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. - * @param message ListIssuesResponse message or plain object to encode + * Encodes the specified ExportIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.verify|verify} messages. + * @param message ExportIssueModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListIssuesResponse message from the specified reader or buffer. + * Decodes an ExportIssueModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListIssuesResponse + * @returns ExportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata; /** - * Decodes a ListIssuesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExportIssueModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListIssuesResponse + * @returns ExportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata; /** - * Verifies a ListIssuesResponse message. + * Verifies an ExportIssueModelMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListIssuesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIssueModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListIssuesResponse + * @returns ExportIssueModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata; /** - * Creates a plain object from a ListIssuesResponse message. Also converts values to other types if specified. - * @param message ListIssuesResponse + * Creates a plain object from an ExportIssueModelMetadata message. Also converts values to other types if specified. + * @param message ExportIssueModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListIssuesResponse to JSON. + * Converts this ExportIssueModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListIssuesResponse + * Gets the default type url for ExportIssueModelMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateIssueRequest. */ - interface IUpdateIssueRequest { + /** Properties of an ImportIssueModelRequest. */ + interface IImportIssueModelRequest { - /** UpdateIssueRequest issue */ - issue?: (google.cloud.contactcenterinsights.v1.IIssue|null); + /** ImportIssueModelRequest gcsSource */ + gcsSource?: (google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource|null); - /** UpdateIssueRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** ImportIssueModelRequest parent */ + parent?: (string|null); + + /** ImportIssueModelRequest createNewModel */ + createNewModel?: (boolean|null); } - /** Represents an UpdateIssueRequest. */ - class UpdateIssueRequest implements IUpdateIssueRequest { + /** Represents an ImportIssueModelRequest. */ + class ImportIssueModelRequest implements IImportIssueModelRequest { /** - * Constructs a new UpdateIssueRequest. + * Constructs a new ImportIssueModelRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IImportIssueModelRequest); - /** UpdateIssueRequest issue. */ - public issue?: (google.cloud.contactcenterinsights.v1.IIssue|null); + /** ImportIssueModelRequest gcsSource. */ + public gcsSource?: (google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource|null); - /** UpdateIssueRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** ImportIssueModelRequest parent. */ + public parent: string; + + /** ImportIssueModelRequest createNewModel. */ + public createNewModel: boolean; + + /** ImportIssueModelRequest Source. */ + public Source?: "gcsSource"; /** - * Creates a new UpdateIssueRequest instance using the specified properties. + * Creates a new ImportIssueModelRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateIssueRequest instance + * @returns ImportIssueModelRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IImportIssueModelRequest): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest; /** - * Encodes the specified UpdateIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. - * @param message UpdateIssueRequest message or plain object to encode + * Encodes the specified ImportIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.verify|verify} messages. + * @param message ImportIssueModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. - * @param message UpdateIssueRequest message or plain object to encode + * Encodes the specified ImportIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.verify|verify} messages. + * @param message ImportIssueModelRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * Decodes an ImportIssueModelRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateIssueRequest + * @returns ImportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest; /** - * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportIssueModelRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateIssueRequest + * @returns ImportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest; /** - * Verifies an UpdateIssueRequest message. + * Verifies an ImportIssueModelRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIssueModelRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateIssueRequest + * @returns ImportIssueModelRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest; /** - * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. - * @param message UpdateIssueRequest + * Creates a plain object from an ImportIssueModelRequest message. Also converts values to other types if specified. + * @param message ImportIssueModelRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ImportIssueModelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateIssueRequest to JSON. + * Converts this ImportIssueModelRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateIssueRequest + * Gets the default type url for ImportIssueModelRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeleteIssueRequest. */ - interface IDeleteIssueRequest { + namespace ImportIssueModelRequest { - /** DeleteIssueRequest name */ - name?: (string|null); + /** Properties of a GcsSource. */ + interface IGcsSource { + + /** GcsSource objectUri */ + objectUri?: (string|null); + } + + /** Represents a GcsSource. */ + class GcsSource implements IGcsSource { + + /** + * Constructs a new GcsSource. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource); + + /** GcsSource objectUri. */ + public objectUri: string; + + /** + * Creates a new GcsSource instance using the specified properties. + * @param [properties] Properties to set + * @returns GcsSource instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.verify|verify} messages. + * @param message GcsSource message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource; + + /** + * Verifies a GcsSource message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GcsSource + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @param message GcsSource + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GcsSource to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GcsSource + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } - /** Represents a DeleteIssueRequest. */ - class DeleteIssueRequest implements IDeleteIssueRequest { + /** Properties of an ImportIssueModelResponse. */ + interface IImportIssueModelResponse { + } + + /** Represents an ImportIssueModelResponse. */ + class ImportIssueModelResponse implements IImportIssueModelResponse { /** - * Constructs a new DeleteIssueRequest. + * Constructs a new ImportIssueModelResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest); - - /** DeleteIssueRequest name. */ - public name: string; + constructor(properties?: google.cloud.contactcenterinsights.v1.IImportIssueModelResponse); /** - * Creates a new DeleteIssueRequest instance using the specified properties. + * Creates a new ImportIssueModelResponse instance using the specified properties. * @param [properties] Properties to set - * @returns DeleteIssueRequest instance + * @returns ImportIssueModelResponse instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IImportIssueModelResponse): google.cloud.contactcenterinsights.v1.ImportIssueModelResponse; /** - * Encodes the specified DeleteIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. - * @param message DeleteIssueRequest message or plain object to encode + * Encodes the specified ImportIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelResponse.verify|verify} messages. + * @param message ImportIssueModelResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeleteIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. - * @param message DeleteIssueRequest message or plain object to encode + * Encodes the specified ImportIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelResponse.verify|verify} messages. + * @param message ImportIssueModelResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeleteIssueRequest message from the specified reader or buffer. + * Decodes an ImportIssueModelResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeleteIssueRequest + * @returns ImportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ImportIssueModelResponse; /** - * Decodes a DeleteIssueRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportIssueModelResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeleteIssueRequest + * @returns ImportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ImportIssueModelResponse; /** - * Verifies a DeleteIssueRequest message. + * Verifies an ImportIssueModelResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeleteIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIssueModelResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeleteIssueRequest + * @returns ImportIssueModelResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ImportIssueModelResponse; /** - * Creates a plain object from a DeleteIssueRequest message. Also converts values to other types if specified. - * @param message DeleteIssueRequest + * Creates a plain object from an ImportIssueModelResponse message. Also converts values to other types if specified. + * @param message ImportIssueModelResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeleteIssueRequest to JSON. + * Converts this ImportIssueModelResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeleteIssueRequest + * Gets the default type url for ImportIssueModelResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CalculateIssueModelStatsRequest. */ - interface ICalculateIssueModelStatsRequest { + /** Properties of an ImportIssueModelMetadata. */ + interface IImportIssueModelMetadata { - /** CalculateIssueModelStatsRequest issueModel */ - issueModel?: (string|null); + /** ImportIssueModelMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** ImportIssueModelMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); + + /** ImportIssueModelMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IImportIssueModelRequest|null); } - /** Represents a CalculateIssueModelStatsRequest. */ - class CalculateIssueModelStatsRequest implements ICalculateIssueModelStatsRequest { + /** Represents an ImportIssueModelMetadata. */ + class ImportIssueModelMetadata implements IImportIssueModelMetadata { /** - * Constructs a new CalculateIssueModelStatsRequest. + * Constructs a new ImportIssueModelMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata); - /** CalculateIssueModelStatsRequest issueModel. */ - public issueModel: string; + /** ImportIssueModelMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); + + /** ImportIssueModelMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** ImportIssueModelMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IImportIssueModelRequest|null); /** - * Creates a new CalculateIssueModelStatsRequest instance using the specified properties. + * Creates a new ImportIssueModelMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns CalculateIssueModelStatsRequest instance + * @returns ImportIssueModelMetadata instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata): google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata; /** - * Encodes the specified CalculateIssueModelStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. - * @param message CalculateIssueModelStatsRequest message or plain object to encode + * Encodes the specified ImportIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.verify|verify} messages. + * @param message ImportIssueModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CalculateIssueModelStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. - * @param message CalculateIssueModelStatsRequest message or plain object to encode + * Encodes the specified ImportIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.verify|verify} messages. + * @param message ImportIssueModelMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer. + * Decodes an ImportIssueModelMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CalculateIssueModelStatsRequest + * @returns ImportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata; /** - * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportIssueModelMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CalculateIssueModelStatsRequest + * @returns ImportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata; /** - * Verifies a CalculateIssueModelStatsRequest message. + * Verifies an ImportIssueModelMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CalculateIssueModelStatsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIssueModelMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CalculateIssueModelStatsRequest + * @returns ImportIssueModelMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata; /** - * Creates a plain object from a CalculateIssueModelStatsRequest message. Also converts values to other types if specified. - * @param message CalculateIssueModelStatsRequest + * Creates a plain object from an ImportIssueModelMetadata message. Also converts values to other types if specified. + * @param message ImportIssueModelMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CalculateIssueModelStatsRequest to JSON. + * Converts this ImportIssueModelMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CalculateIssueModelStatsRequest + * Gets the default type url for ImportIssueModelMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CalculateIssueModelStatsResponse. */ - interface ICalculateIssueModelStatsResponse { + /** Properties of a GetIssueRequest. */ + interface IGetIssueRequest { - /** CalculateIssueModelStatsResponse currentStats */ - currentStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + /** GetIssueRequest name */ + name?: (string|null); } - /** Represents a CalculateIssueModelStatsResponse. */ - class CalculateIssueModelStatsResponse implements ICalculateIssueModelStatsResponse { + /** Represents a GetIssueRequest. */ + class GetIssueRequest implements IGetIssueRequest { /** - * Constructs a new CalculateIssueModelStatsResponse. + * Constructs a new GetIssueRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse); + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetIssueRequest); - /** CalculateIssueModelStatsResponse currentStats. */ - public currentStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + /** GetIssueRequest name. */ + public name: string; /** - * Creates a new CalculateIssueModelStatsResponse instance using the specified properties. + * Creates a new GetIssueRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CalculateIssueModelStatsResponse instance + * @returns GetIssueRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetIssueRequest): google.cloud.contactcenterinsights.v1.GetIssueRequest; /** - * Encodes the specified CalculateIssueModelStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. - * @param message CalculateIssueModelStatsResponse message or plain object to encode + * Encodes the specified GetIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @param message GetIssueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IGetIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CalculateIssueModelStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. - * @param message CalculateIssueModelStatsResponse message or plain object to encode + * Encodes the specified GetIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @param message GetIssueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer. + * Decodes a GetIssueRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CalculateIssueModelStatsResponse + * @returns GetIssueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetIssueRequest; /** - * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetIssueRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CalculateIssueModelStatsResponse + * @returns GetIssueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetIssueRequest; /** - * Verifies a CalculateIssueModelStatsResponse message. + * Verifies a GetIssueRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CalculateIssueModelStatsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetIssueRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CalculateIssueModelStatsResponse + * @returns GetIssueRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetIssueRequest; /** - * Creates a plain object from a CalculateIssueModelStatsResponse message. Also converts values to other types if specified. - * @param message CalculateIssueModelStatsResponse + * Creates a plain object from a GetIssueRequest message. Also converts values to other types if specified. + * @param message GetIssueRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.GetIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CalculateIssueModelStatsResponse to JSON. + * Converts this GetIssueRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CalculateIssueModelStatsResponse + * Gets the default type url for GetIssueRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a CreatePhraseMatcherRequest. */ - interface ICreatePhraseMatcherRequest { + /** Properties of a ListIssuesRequest. */ + interface IListIssuesRequest { - /** CreatePhraseMatcherRequest parent */ + /** ListIssuesRequest parent */ parent?: (string|null); - - /** CreatePhraseMatcherRequest phraseMatcher */ - phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); } - /** Represents a CreatePhraseMatcherRequest. */ - class CreatePhraseMatcherRequest implements ICreatePhraseMatcherRequest { + /** Represents a ListIssuesRequest. */ + class ListIssuesRequest implements IListIssuesRequest { /** - * Constructs a new CreatePhraseMatcherRequest. + * Constructs a new ListIssuesRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssuesRequest); - /** CreatePhraseMatcherRequest parent. */ + /** ListIssuesRequest parent. */ public parent: string; - /** CreatePhraseMatcherRequest phraseMatcher. */ - public phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); - /** - * Creates a new CreatePhraseMatcherRequest instance using the specified properties. + * Creates a new ListIssuesRequest instance using the specified properties. * @param [properties] Properties to set - * @returns CreatePhraseMatcherRequest instance + * @returns ListIssuesRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssuesRequest): google.cloud.contactcenterinsights.v1.ListIssuesRequest; /** - * Encodes the specified CreatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. - * @param message CreatePhraseMatcherRequest message or plain object to encode + * Encodes the specified ListIssuesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @param message ListIssuesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IListIssuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified CreatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. - * @param message CreatePhraseMatcherRequest message or plain object to encode + * Encodes the specified ListIssuesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @param message ListIssuesRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssuesRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer. + * Decodes a ListIssuesRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns CreatePhraseMatcherRequest + * @returns ListIssuesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssuesRequest; /** - * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes a ListIssuesRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns CreatePhraseMatcherRequest + * @returns ListIssuesRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssuesRequest; /** - * Verifies a CreatePhraseMatcherRequest message. + * Verifies a ListIssuesRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a CreatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates a ListIssuesRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns CreatePhraseMatcherRequest + * @returns ListIssuesRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssuesRequest; /** - * Creates a plain object from a CreatePhraseMatcherRequest message. Also converts values to other types if specified. - * @param message CreatePhraseMatcherRequest + * Creates a plain object from a ListIssuesRequest message. Also converts values to other types if specified. + * @param message ListIssuesRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssuesRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this CreatePhraseMatcherRequest to JSON. + * Converts this ListIssuesRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for CreatePhraseMatcherRequest + * Gets the default type url for ListIssuesRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPhraseMatchersRequest. */ - interface IListPhraseMatchersRequest { - - /** ListPhraseMatchersRequest parent */ - parent?: (string|null); + /** Properties of a ListIssuesResponse. */ + interface IListIssuesResponse { - /** ListPhraseMatchersRequest pageSize */ - pageSize?: (number|null); + /** ListIssuesResponse issues */ + issues?: (google.cloud.contactcenterinsights.v1.IIssue[]|null); + } - /** ListPhraseMatchersRequest pageToken */ - pageToken?: (string|null); + /** Represents a ListIssuesResponse. */ + class ListIssuesResponse implements IListIssuesResponse { - /** ListPhraseMatchersRequest filter */ - filter?: (string|null); - } + /** + * Constructs a new ListIssuesResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListIssuesResponse); - /** Represents a ListPhraseMatchersRequest. */ - class ListPhraseMatchersRequest implements IListPhraseMatchersRequest { + /** ListIssuesResponse issues. */ + public issues: google.cloud.contactcenterinsights.v1.IIssue[]; /** - * Constructs a new ListPhraseMatchersRequest. + * Creates a new ListIssuesResponse instance using the specified properties. * @param [properties] Properties to set + * @returns ListIssuesResponse instance */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest); + public static create(properties?: google.cloud.contactcenterinsights.v1.IListIssuesResponse): google.cloud.contactcenterinsights.v1.ListIssuesResponse; - /** ListPhraseMatchersRequest parent. */ - public parent: string; + /** + * Encodes the specified ListIssuesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @param message ListIssuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListIssuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListPhraseMatchersRequest pageSize. */ - public pageSize: number; + /** + * Encodes the specified ListIssuesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @param message ListIssuesResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListIssuesResponse, writer?: $protobuf.Writer): $protobuf.Writer; - /** ListPhraseMatchersRequest pageToken. */ - public pageToken: string; + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListIssuesResponse; - /** ListPhraseMatchersRequest filter. */ - public filter: string; + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListIssuesResponse; /** - * Creates a new ListPhraseMatchersRequest instance using the specified properties. + * Verifies a ListIssuesResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListIssuesResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListIssuesResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListIssuesResponse; + + /** + * Creates a plain object from a ListIssuesResponse message. Also converts values to other types if specified. + * @param message ListIssuesResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListIssuesResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListIssuesResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListIssuesResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdateIssueRequest. */ + interface IUpdateIssueRequest { + + /** UpdateIssueRequest issue */ + issue?: (google.cloud.contactcenterinsights.v1.IIssue|null); + + /** UpdateIssueRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdateIssueRequest. */ + class UpdateIssueRequest implements IUpdateIssueRequest { + + /** + * Constructs a new UpdateIssueRequest. * @param [properties] Properties to set - * @returns ListPhraseMatchersRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest); + + /** UpdateIssueRequest issue. */ + public issue?: (google.cloud.contactcenterinsights.v1.IIssue|null); + + /** UpdateIssueRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Encodes the specified ListPhraseMatchersRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. - * @param message ListPhraseMatchersRequest message or plain object to encode + * Creates a new UpdateIssueRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdateIssueRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; + + /** + * Encodes the specified UpdateIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @param message UpdateIssueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPhraseMatchersRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. - * @param message ListPhraseMatchersRequest message or plain object to encode + * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @param message UpdateIssueRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer. + * Decodes an UpdateIssueRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPhraseMatchersRequest + * @returns UpdateIssueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; /** - * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPhraseMatchersRequest + * @returns UpdateIssueRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; /** - * Verifies a ListPhraseMatchersRequest message. + * Verifies an UpdateIssueRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPhraseMatchersRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPhraseMatchersRequest + * @returns UpdateIssueRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateIssueRequest; /** - * Creates a plain object from a ListPhraseMatchersRequest message. Also converts values to other types if specified. - * @param message ListPhraseMatchersRequest + * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * @param message UpdateIssueRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPhraseMatchersRequest to JSON. + * Converts this UpdateIssueRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPhraseMatchersRequest + * Gets the default type url for UpdateIssueRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a ListPhraseMatchersResponse. */ - interface IListPhraseMatchersResponse { + /** Properties of a DeleteIssueRequest. */ + interface IDeleteIssueRequest { - /** ListPhraseMatchersResponse phraseMatchers */ - phraseMatchers?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher[]|null); + /** DeleteIssueRequest name */ + name?: (string|null); + } + + /** Represents a DeleteIssueRequest. */ + class DeleteIssueRequest implements IDeleteIssueRequest { + + /** + * Constructs a new DeleteIssueRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest); + + /** DeleteIssueRequest name. */ + public name: string; + + /** + * Creates a new DeleteIssueRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteIssueRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Encodes the specified DeleteIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @param message DeleteIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @param message DeleteIssueRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeleteIssueRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteIssueRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Decodes a DeleteIssueRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Verifies a DeleteIssueRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteIssueRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteIssueRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeleteIssueRequest; + + /** + * Creates a plain object from a DeleteIssueRequest message. Also converts values to other types if specified. + * @param message DeleteIssueRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeleteIssueRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteIssueRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteIssueRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateIssueModelStatsRequest. */ + interface ICalculateIssueModelStatsRequest { + + /** CalculateIssueModelStatsRequest issueModel */ + issueModel?: (string|null); + } + + /** Represents a CalculateIssueModelStatsRequest. */ + class CalculateIssueModelStatsRequest implements ICalculateIssueModelStatsRequest { + + /** + * Constructs a new CalculateIssueModelStatsRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest); + + /** CalculateIssueModelStatsRequest issueModel. */ + public issueModel: string; + + /** + * Creates a new CalculateIssueModelStatsRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateIssueModelStatsRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @param message CalculateIssueModelStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @param message CalculateIssueModelStatsRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Verifies a CalculateIssueModelStatsRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateIssueModelStatsRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateIssueModelStatsRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest; + + /** + * Creates a plain object from a CalculateIssueModelStatsRequest message. Also converts values to other types if specified. + * @param message CalculateIssueModelStatsRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateIssueModelStatsRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateIssueModelStatsRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CalculateIssueModelStatsResponse. */ + interface ICalculateIssueModelStatsResponse { + + /** CalculateIssueModelStatsResponse currentStats */ + currentStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + } + + /** Represents a CalculateIssueModelStatsResponse. */ + class CalculateIssueModelStatsResponse implements ICalculateIssueModelStatsResponse { + + /** + * Constructs a new CalculateIssueModelStatsResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse); + + /** CalculateIssueModelStatsResponse currentStats. */ + public currentStats?: (google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null); + + /** + * Creates a new CalculateIssueModelStatsResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns CalculateIssueModelStatsResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @param message CalculateIssueModelStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @param message CalculateIssueModelStatsResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Verifies a CalculateIssueModelStatsResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CalculateIssueModelStatsResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CalculateIssueModelStatsResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse; + + /** + * Creates a plain object from a CalculateIssueModelStatsResponse message. Also converts values to other types if specified. + * @param message CalculateIssueModelStatsResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CalculateIssueModelStatsResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CalculateIssueModelStatsResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreatePhraseMatcherRequest. */ + interface ICreatePhraseMatcherRequest { + + /** CreatePhraseMatcherRequest parent */ + parent?: (string|null); + + /** CreatePhraseMatcherRequest phraseMatcher */ + phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + } + + /** Represents a CreatePhraseMatcherRequest. */ + class CreatePhraseMatcherRequest implements ICreatePhraseMatcherRequest { + + /** + * Constructs a new CreatePhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest); + + /** CreatePhraseMatcherRequest parent. */ + public parent: string; + + /** CreatePhraseMatcherRequest phraseMatcher. */ + public phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + + /** + * Creates a new CreatePhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreatePhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Encodes the specified CreatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @param message CreatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @param message CreatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Verifies a CreatePhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreatePhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest; + + /** + * Creates a plain object from a CreatePhraseMatcherRequest message. Also converts values to other types if specified. + * @param message CreatePhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreatePhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreatePhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPhraseMatchersRequest. */ + interface IListPhraseMatchersRequest { + + /** ListPhraseMatchersRequest parent */ + parent?: (string|null); + + /** ListPhraseMatchersRequest pageSize */ + pageSize?: (number|null); + + /** ListPhraseMatchersRequest pageToken */ + pageToken?: (string|null); + + /** ListPhraseMatchersRequest filter */ + filter?: (string|null); + } + + /** Represents a ListPhraseMatchersRequest. */ + class ListPhraseMatchersRequest implements IListPhraseMatchersRequest { + + /** + * Constructs a new ListPhraseMatchersRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest); + + /** ListPhraseMatchersRequest parent. */ + public parent: string; + + /** ListPhraseMatchersRequest pageSize. */ + public pageSize: number; + + /** ListPhraseMatchersRequest pageToken. */ + public pageToken: string; + + /** ListPhraseMatchersRequest filter. */ + public filter: string; + + /** + * Creates a new ListPhraseMatchersRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPhraseMatchersRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Encodes the specified ListPhraseMatchersRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @param message ListPhraseMatchersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPhraseMatchersRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @param message ListPhraseMatchersRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Verifies a ListPhraseMatchersRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPhraseMatchersRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPhraseMatchersRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest; + + /** + * Creates a plain object from a ListPhraseMatchersRequest message. Also converts values to other types if specified. + * @param message ListPhraseMatchersRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPhraseMatchersRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPhraseMatchersRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListPhraseMatchersResponse. */ + interface IListPhraseMatchersResponse { + + /** ListPhraseMatchersResponse phraseMatchers */ + phraseMatchers?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher[]|null); + + /** ListPhraseMatchersResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListPhraseMatchersResponse. */ + class ListPhraseMatchersResponse implements IListPhraseMatchersResponse { + + /** + * Constructs a new ListPhraseMatchersResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse); + + /** ListPhraseMatchersResponse phraseMatchers. */ + public phraseMatchers: google.cloud.contactcenterinsights.v1.IPhraseMatcher[]; + + /** ListPhraseMatchersResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListPhraseMatchersResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListPhraseMatchersResponse instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Encodes the specified ListPhraseMatchersResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @param message ListPhraseMatchersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListPhraseMatchersResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @param message ListPhraseMatchersResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Verifies a ListPhraseMatchersResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListPhraseMatchersResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListPhraseMatchersResponse + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + + /** + * Creates a plain object from a ListPhraseMatchersResponse message. Also converts values to other types if specified. + * @param message ListPhraseMatchersResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListPhraseMatchersResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListPhraseMatchersResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetPhraseMatcherRequest. */ + interface IGetPhraseMatcherRequest { + + /** GetPhraseMatcherRequest name */ + name?: (string|null); + } + + /** Represents a GetPhraseMatcherRequest. */ + class GetPhraseMatcherRequest implements IGetPhraseMatcherRequest { + + /** + * Constructs a new GetPhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest); + + /** GetPhraseMatcherRequest name. */ + public name: string; + + /** + * Creates a new GetPhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetPhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Encodes the specified GetPhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * @param message GetPhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetPhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * @param message GetPhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetPhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetPhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Verifies a GetPhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetPhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetPhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + + /** + * Creates a plain object from a GetPhraseMatcherRequest message. Also converts values to other types if specified. + * @param message GetPhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetPhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetPhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeletePhraseMatcherRequest. */ + interface IDeletePhraseMatcherRequest { + + /** DeletePhraseMatcherRequest name */ + name?: (string|null); + } + + /** Represents a DeletePhraseMatcherRequest. */ + class DeletePhraseMatcherRequest implements IDeletePhraseMatcherRequest { + + /** + * Constructs a new DeletePhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest); + + /** DeletePhraseMatcherRequest name. */ + public name: string; + + /** + * Creates a new DeletePhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeletePhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Encodes the specified DeletePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * @param message DeletePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeletePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * @param message DeletePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeletePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeletePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Verifies a DeletePhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeletePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeletePhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + + /** + * Creates a plain object from a DeletePhraseMatcherRequest message. Also converts values to other types if specified. + * @param message DeletePhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeletePhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeletePhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an UpdatePhraseMatcherRequest. */ + interface IUpdatePhraseMatcherRequest { + + /** UpdatePhraseMatcherRequest phraseMatcher */ + phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + + /** UpdatePhraseMatcherRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); + } + + /** Represents an UpdatePhraseMatcherRequest. */ + class UpdatePhraseMatcherRequest implements IUpdatePhraseMatcherRequest { + + /** + * Constructs a new UpdatePhraseMatcherRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest); + + /** UpdatePhraseMatcherRequest phraseMatcher. */ + public phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + + /** UpdatePhraseMatcherRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); + + /** + * Creates a new UpdatePhraseMatcherRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns UpdatePhraseMatcherRequest instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Encodes the specified UpdatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * @param message UpdatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UpdatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * @param message UpdatePhraseMatcherRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UpdatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UpdatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Verifies an UpdatePhraseMatcherRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UpdatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UpdatePhraseMatcherRequest + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + + /** + * Creates a plain object from an UpdatePhraseMatcherRequest message. Also converts values to other types if specified. + * @param message UpdatePhraseMatcherRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UpdatePhraseMatcherRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UpdatePhraseMatcherRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GetSettingsRequest. */ + interface IGetSettingsRequest { - /** ListPhraseMatchersResponse nextPageToken */ - nextPageToken?: (string|null); + /** GetSettingsRequest name */ + name?: (string|null); } - /** Represents a ListPhraseMatchersResponse. */ - class ListPhraseMatchersResponse implements IListPhraseMatchersResponse { + /** Represents a GetSettingsRequest. */ + class GetSettingsRequest implements IGetSettingsRequest { /** - * Constructs a new ListPhraseMatchersResponse. + * Constructs a new GetSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse); - - /** ListPhraseMatchersResponse phraseMatchers. */ - public phraseMatchers: google.cloud.contactcenterinsights.v1.IPhraseMatcher[]; + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetSettingsRequest); - /** ListPhraseMatchersResponse nextPageToken. */ - public nextPageToken: string; + /** GetSettingsRequest name. */ + public name: string; /** - * Creates a new ListPhraseMatchersResponse instance using the specified properties. + * Creates a new GetSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns ListPhraseMatchersResponse instance + * @returns GetSettingsRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetSettingsRequest): google.cloud.contactcenterinsights.v1.GetSettingsRequest; /** - * Encodes the specified ListPhraseMatchersResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. - * @param message ListPhraseMatchersResponse message or plain object to encode + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * @param message GetSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified ListPhraseMatchersResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. - * @param message ListPhraseMatchersResponse message or plain object to encode + * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * @param message GetSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer. + * Decodes a GetSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns ListPhraseMatchersResponse + * @returns GetSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetSettingsRequest; /** - * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns ListPhraseMatchersResponse + * @returns GetSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetSettingsRequest; /** - * Verifies a ListPhraseMatchersResponse message. + * Verifies a GetSettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a ListPhraseMatchersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns ListPhraseMatchersResponse + * @returns GetSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetSettingsRequest; /** - * Creates a plain object from a ListPhraseMatchersResponse message. Also converts values to other types if specified. - * @param message ListPhraseMatchersResponse + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * @param message GetSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.GetSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this ListPhraseMatchersResponse to JSON. + * Converts this GetSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for ListPhraseMatchersResponse + * Gets the default type url for GetSettingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetPhraseMatcherRequest. */ - interface IGetPhraseMatcherRequest { + /** Properties of an UpdateSettingsRequest. */ + interface IUpdateSettingsRequest { - /** GetPhraseMatcherRequest name */ - name?: (string|null); + /** UpdateSettingsRequest settings */ + settings?: (google.cloud.contactcenterinsights.v1.ISettings|null); + + /** UpdateSettingsRequest updateMask */ + updateMask?: (google.protobuf.IFieldMask|null); } - /** Represents a GetPhraseMatcherRequest. */ - class GetPhraseMatcherRequest implements IGetPhraseMatcherRequest { + /** Represents an UpdateSettingsRequest. */ + class UpdateSettingsRequest implements IUpdateSettingsRequest { /** - * Constructs a new GetPhraseMatcherRequest. + * Constructs a new UpdateSettingsRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest); - /** GetPhraseMatcherRequest name. */ - public name: string; + /** UpdateSettingsRequest settings. */ + public settings?: (google.cloud.contactcenterinsights.v1.ISettings|null); + + /** UpdateSettingsRequest updateMask. */ + public updateMask?: (google.protobuf.IFieldMask|null); /** - * Creates a new GetPhraseMatcherRequest instance using the specified properties. + * Creates a new UpdateSettingsRequest instance using the specified properties. * @param [properties] Properties to set - * @returns GetPhraseMatcherRequest instance + * @returns UpdateSettingsRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; /** - * Encodes the specified GetPhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. - * @param message GetPhraseMatcherRequest message or plain object to encode + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * @param message UpdateSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetPhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. - * @param message GetPhraseMatcherRequest message or plain object to encode + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * @param message UpdateSettingsRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer. + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetPhraseMatcherRequest + * @returns UpdateSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; /** - * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetPhraseMatcherRequest + * @returns UpdateSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; /** - * Verifies a GetPhraseMatcherRequest message. + * Verifies an UpdateSettingsRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetPhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetPhraseMatcherRequest + * @returns UpdateSettingsRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; /** - * Creates a plain object from a GetPhraseMatcherRequest message. Also converts values to other types if specified. - * @param message GetPhraseMatcherRequest + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * @param message UpdateSettingsRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetPhraseMatcherRequest to JSON. + * Converts this UpdateSettingsRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetPhraseMatcherRequest + * Gets the default type url for UpdateSettingsRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a DeletePhraseMatcherRequest. */ - interface IDeletePhraseMatcherRequest { + /** Properties of a GetEncryptionSpecRequest. */ + interface IGetEncryptionSpecRequest { - /** DeletePhraseMatcherRequest name */ + /** GetEncryptionSpecRequest name */ name?: (string|null); } - /** Represents a DeletePhraseMatcherRequest. */ - class DeletePhraseMatcherRequest implements IDeletePhraseMatcherRequest { + /** Represents a GetEncryptionSpecRequest. */ + class GetEncryptionSpecRequest implements IGetEncryptionSpecRequest { /** - * Constructs a new DeletePhraseMatcherRequest. + * Constructs a new GetEncryptionSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest); - /** DeletePhraseMatcherRequest name. */ + /** GetEncryptionSpecRequest name. */ public name: string; /** - * Creates a new DeletePhraseMatcherRequest instance using the specified properties. + * Creates a new GetEncryptionSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns DeletePhraseMatcherRequest instance + * @returns GetEncryptionSpecRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Encodes the specified DeletePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. - * @param message DeletePhraseMatcherRequest message or plain object to encode + * Encodes the specified GetEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. + * @param message GetEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified DeletePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. - * @param message DeletePhraseMatcherRequest message or plain object to encode + * Encodes the specified GetEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. + * @param message GetEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns DeletePhraseMatcherRequest + * @returns GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns DeletePhraseMatcherRequest + * @returns GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Verifies a DeletePhraseMatcherRequest message. + * Verifies a GetEncryptionSpecRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a DeletePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns DeletePhraseMatcherRequest + * @returns GetEncryptionSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest; /** - * Creates a plain object from a DeletePhraseMatcherRequest message. Also converts values to other types if specified. - * @param message DeletePhraseMatcherRequest + * Creates a plain object from a GetEncryptionSpecRequest message. Also converts values to other types if specified. + * @param message GetEncryptionSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this DeletePhraseMatcherRequest to JSON. + * Converts this GetEncryptionSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for DeletePhraseMatcherRequest + * Gets the default type url for GetEncryptionSpecRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdatePhraseMatcherRequest. */ - interface IUpdatePhraseMatcherRequest { - - /** UpdatePhraseMatcherRequest phraseMatcher */ - phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); + /** Properties of an InitializeEncryptionSpecRequest. */ + interface IInitializeEncryptionSpecRequest { - /** UpdatePhraseMatcherRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** InitializeEncryptionSpecRequest encryptionSpec */ + encryptionSpec?: (google.cloud.contactcenterinsights.v1.IEncryptionSpec|null); } - /** Represents an UpdatePhraseMatcherRequest. */ - class UpdatePhraseMatcherRequest implements IUpdatePhraseMatcherRequest { + /** Represents an InitializeEncryptionSpecRequest. */ + class InitializeEncryptionSpecRequest implements IInitializeEncryptionSpecRequest { /** - * Constructs a new UpdatePhraseMatcherRequest. + * Constructs a new InitializeEncryptionSpecRequest. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest); - /** UpdatePhraseMatcherRequest phraseMatcher. */ - public phraseMatcher?: (google.cloud.contactcenterinsights.v1.IPhraseMatcher|null); - - /** UpdatePhraseMatcherRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** InitializeEncryptionSpecRequest encryptionSpec. */ + public encryptionSpec?: (google.cloud.contactcenterinsights.v1.IEncryptionSpec|null); /** - * Creates a new UpdatePhraseMatcherRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecRequest instance using the specified properties. * @param [properties] Properties to set - * @returns UpdatePhraseMatcherRequest instance + * @returns InitializeEncryptionSpecRequest instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Encodes the specified UpdatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. - * @param message UpdatePhraseMatcherRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. + * @param message InitializeEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. - * @param message UpdatePhraseMatcherRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. + * @param message InitializeEncryptionSpecRequest message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdatePhraseMatcherRequest + * @returns InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdatePhraseMatcherRequest + * @returns InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Verifies an UpdatePhraseMatcherRequest message. + * Verifies an InitializeEncryptionSpecRequest message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdatePhraseMatcherRequest + * @returns InitializeEncryptionSpecRequest */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest; /** - * Creates a plain object from an UpdatePhraseMatcherRequest message. Also converts values to other types if specified. - * @param message UpdatePhraseMatcherRequest + * Creates a plain object from an InitializeEncryptionSpecRequest message. Also converts values to other types if specified. + * @param message InitializeEncryptionSpecRequest * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdatePhraseMatcherRequest to JSON. + * Converts this InitializeEncryptionSpecRequest to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdatePhraseMatcherRequest + * Gets the default type url for InitializeEncryptionSpecRequest * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a GetSettingsRequest. */ - interface IGetSettingsRequest { - - /** GetSettingsRequest name */ - name?: (string|null); + /** Properties of an InitializeEncryptionSpecResponse. */ + interface IInitializeEncryptionSpecResponse { } - /** Represents a GetSettingsRequest. */ - class GetSettingsRequest implements IGetSettingsRequest { + /** Represents an InitializeEncryptionSpecResponse. */ + class InitializeEncryptionSpecResponse implements IInitializeEncryptionSpecResponse { /** - * Constructs a new GetSettingsRequest. + * Constructs a new InitializeEncryptionSpecResponse. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IGetSettingsRequest); - - /** GetSettingsRequest name. */ - public name: string; + constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse); /** - * Creates a new GetSettingsRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecResponse instance using the specified properties. * @param [properties] Properties to set - * @returns GetSettingsRequest instance + * @returns InitializeEncryptionSpecResponse instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IGetSettingsRequest): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. - * @param message GetSettingsRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. + * @param message InitializeEncryptionSpecResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. - * @param message GetSettingsRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. + * @param message InitializeEncryptionSpecResponse message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IGetSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a GetSettingsRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns GetSettingsRequest + * @returns InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns GetSettingsRequest + * @returns InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Verifies a GetSettingsRequest message. + * Verifies an InitializeEncryptionSpecResponse message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecResponse message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns GetSettingsRequest + * @returns InitializeEncryptionSpecResponse */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.GetSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse; /** - * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. - * @param message GetSettingsRequest + * Creates a plain object from an InitializeEncryptionSpecResponse message. Also converts values to other types if specified. + * @param message InitializeEncryptionSpecResponse * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.GetSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this GetSettingsRequest to JSON. + * Converts this InitializeEncryptionSpecResponse to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for GetSettingsRequest + * Gets the default type url for InitializeEncryptionSpecResponse * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of an UpdateSettingsRequest. */ - interface IUpdateSettingsRequest { + /** Properties of an InitializeEncryptionSpecMetadata. */ + interface IInitializeEncryptionSpecMetadata { - /** UpdateSettingsRequest settings */ - settings?: (google.cloud.contactcenterinsights.v1.ISettings|null); + /** InitializeEncryptionSpecMetadata createTime */ + createTime?: (google.protobuf.ITimestamp|null); + + /** InitializeEncryptionSpecMetadata endTime */ + endTime?: (google.protobuf.ITimestamp|null); - /** UpdateSettingsRequest updateMask */ - updateMask?: (google.protobuf.IFieldMask|null); + /** InitializeEncryptionSpecMetadata request */ + request?: (google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null); + + /** InitializeEncryptionSpecMetadata partialErrors */ + partialErrors?: (google.rpc.IStatus[]|null); } - /** Represents an UpdateSettingsRequest. */ - class UpdateSettingsRequest implements IUpdateSettingsRequest { + /** Represents an InitializeEncryptionSpecMetadata. */ + class InitializeEncryptionSpecMetadata implements IInitializeEncryptionSpecMetadata { /** - * Constructs a new UpdateSettingsRequest. + * Constructs a new InitializeEncryptionSpecMetadata. * @param [properties] Properties to set */ - constructor(properties?: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest); + constructor(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata); - /** UpdateSettingsRequest settings. */ - public settings?: (google.cloud.contactcenterinsights.v1.ISettings|null); + /** InitializeEncryptionSpecMetadata createTime. */ + public createTime?: (google.protobuf.ITimestamp|null); - /** UpdateSettingsRequest updateMask. */ - public updateMask?: (google.protobuf.IFieldMask|null); + /** InitializeEncryptionSpecMetadata endTime. */ + public endTime?: (google.protobuf.ITimestamp|null); + + /** InitializeEncryptionSpecMetadata request. */ + public request?: (google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null); + + /** InitializeEncryptionSpecMetadata partialErrors. */ + public partialErrors: google.rpc.IStatus[]; /** - * Creates a new UpdateSettingsRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecMetadata instance using the specified properties. * @param [properties] Properties to set - * @returns UpdateSettingsRequest instance + * @returns InitializeEncryptionSpecMetadata instance */ - public static create(properties?: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + public static create(properties?: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. - * @param message UpdateSettingsRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. + * @param message InitializeEncryptionSpecMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. - * @param message UpdateSettingsRequest message or plain object to encode + * Encodes the specified InitializeEncryptionSpecMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. + * @param message InitializeEncryptionSpecMetadata message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns UpdateSettingsRequest + * @returns InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns UpdateSettingsRequest + * @returns InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Verifies an UpdateSettingsRequest message. + * Verifies an InitializeEncryptionSpecMetadata message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecMetadata message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns UpdateSettingsRequest + * @returns InitializeEncryptionSpecMetadata */ - public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.UpdateSettingsRequest; + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata; /** - * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. - * @param message UpdateSettingsRequest + * Creates a plain object from an InitializeEncryptionSpecMetadata message. Also converts values to other types if specified. + * @param message InitializeEncryptionSpecMetadata * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.cloud.contactcenterinsights.v1.UpdateSettingsRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this UpdateSettingsRequest to JSON. + * Converts this InitializeEncryptionSpecMetadata to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for UpdateSettingsRequest + * Gets the default type url for InitializeEncryptionSpecMetadata * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ @@ -8310,6 +9642,9 @@ export namespace google { /** Conversation qualityMetadata */ qualityMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null); + /** Conversation metadataJson */ + metadataJson?: (string|null); + /** Conversation transcript */ transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); @@ -8383,6 +9718,9 @@ export namespace google { /** Conversation qualityMetadata. */ public qualityMetadata?: (google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null); + /** Conversation metadataJson. */ + public metadataJson: string; + /** Conversation transcript. */ public transcript?: (google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null); @@ -9853,6 +11191,9 @@ export namespace google { /** CallAnalysisMetadata sentiments */ sentiments?: (google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]|null); + /** CallAnalysisMetadata silence */ + silence?: (google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null); + /** CallAnalysisMetadata intents */ intents?: ({ [k: string]: google.cloud.contactcenterinsights.v1.IIntent }|null); @@ -9881,6 +11222,9 @@ export namespace google { /** CallAnalysisMetadata sentiments. */ public sentiments: google.cloud.contactcenterinsights.v1.IConversationLevelSentiment[]; + /** CallAnalysisMetadata silence. */ + public silence?: (google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null); + /** CallAnalysisMetadata intents. */ public intents: { [k: string]: google.cloud.contactcenterinsights.v1.IIntent }; @@ -10175,6 +11519,109 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ConversationLevelSilence. */ + interface IConversationLevelSilence { + + /** ConversationLevelSilence silenceDuration */ + silenceDuration?: (google.protobuf.IDuration|null); + + /** ConversationLevelSilence silencePercentage */ + silencePercentage?: (number|null); + } + + /** Represents a ConversationLevelSilence. */ + class ConversationLevelSilence implements IConversationLevelSilence { + + /** + * Constructs a new ConversationLevelSilence. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSilence); + + /** ConversationLevelSilence silenceDuration. */ + public silenceDuration?: (google.protobuf.IDuration|null); + + /** ConversationLevelSilence silencePercentage. */ + public silencePercentage: number; + + /** + * Creates a new ConversationLevelSilence instance using the specified properties. + * @param [properties] Properties to set + * @returns ConversationLevelSilence instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IConversationLevelSilence): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + + /** + * Encodes the specified ConversationLevelSilence message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @param message ConversationLevelSilence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IConversationLevelSilence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ConversationLevelSilence message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @param message ConversationLevelSilence message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IConversationLevelSilence, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + + /** + * Verifies a ConversationLevelSilence message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ConversationLevelSilence message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ConversationLevelSilence + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.ConversationLevelSilence; + + /** + * Creates a plain object from a ConversationLevelSilence message. Also converts values to other types if specified. + * @param message ConversationLevelSilence + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.ConversationLevelSilence, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ConversationLevelSilence to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ConversationLevelSilence + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of an IssueAssignment. */ interface IIssueAssignment { @@ -11980,6 +13427,9 @@ export namespace google { /** Issue sampleUtterances */ sampleUtterances?: (string[]|null); + + /** Issue displayDescription */ + displayDescription?: (string|null); } /** Represents an Issue. */ @@ -12006,6 +13456,9 @@ export namespace google { /** Issue sampleUtterances. */ public sampleUtterances: string[]; + /** Issue displayDescription. */ + public displayDescription: string; + /** * Creates a new Issue instance using the specified properties. * @param [properties] Properties to set @@ -13148,6 +14601,109 @@ export namespace google { } } + /** Properties of an EncryptionSpec. */ + interface IEncryptionSpec { + + /** EncryptionSpec name */ + name?: (string|null); + + /** EncryptionSpec kmsKey */ + kmsKey?: (string|null); + } + + /** Represents an EncryptionSpec. */ + class EncryptionSpec implements IEncryptionSpec { + + /** + * Constructs a new EncryptionSpec. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.IEncryptionSpec); + + /** EncryptionSpec name. */ + public name: string; + + /** EncryptionSpec kmsKey. */ + public kmsKey: string; + + /** + * Creates a new EncryptionSpec instance using the specified properties. + * @param [properties] Properties to set + * @returns EncryptionSpec instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.IEncryptionSpec): google.cloud.contactcenterinsights.v1.EncryptionSpec; + + /** + * Encodes the specified EncryptionSpec message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @param message EncryptionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.IEncryptionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EncryptionSpec message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @param message EncryptionSpec message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.IEncryptionSpec, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EncryptionSpec message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.EncryptionSpec; + + /** + * Decodes an EncryptionSpec message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.EncryptionSpec; + + /** + * Verifies an EncryptionSpec message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EncryptionSpec message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EncryptionSpec + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.EncryptionSpec; + + /** + * Creates a plain object from an EncryptionSpec message. Also converts values to other types if specified. + * @param message EncryptionSpec + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.EncryptionSpec, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EncryptionSpec to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EncryptionSpec + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RedactionConfig. */ interface IRedactionConfig { @@ -13383,6 +14939,9 @@ export namespace google { /** RuntimeAnnotation answerFeedback */ answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + + /** RuntimeAnnotation userInput */ + userInput?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null); } /** Represents a RuntimeAnnotation. */ @@ -13427,6 +14986,9 @@ export namespace google { /** RuntimeAnnotation answerFeedback. */ public answerFeedback?: (google.cloud.contactcenterinsights.v1.IAnswerFeedback|null); + /** RuntimeAnnotation userInput. */ + public userInput?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null); + /** RuntimeAnnotation data. */ public data?: ("articleSuggestion"|"faqAnswer"|"smartReply"|"smartComposeSuggestion"|"dialogflowInteraction"|"conversationSummarizationSuggestion"); @@ -13508,6 +15070,128 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace RuntimeAnnotation { + + /** Properties of a UserInput. */ + interface IUserInput { + + /** UserInput query */ + query?: (string|null); + + /** UserInput generatorName */ + generatorName?: (string|null); + + /** UserInput querySource */ + querySource?: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|keyof typeof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|null); + } + + /** Represents a UserInput. */ + class UserInput implements IUserInput { + + /** + * Constructs a new UserInput. + * @param [properties] Properties to set + */ + constructor(properties?: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput); + + /** UserInput query. */ + public query: string; + + /** UserInput generatorName. */ + public generatorName: string; + + /** UserInput querySource. */ + public querySource: (google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|keyof typeof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource); + + /** + * Creates a new UserInput instance using the specified properties. + * @param [properties] Properties to set + * @returns UserInput instance + */ + public static create(properties?: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + + /** + * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @param message UserInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @param message UserInput message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a UserInput message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + + /** + * Decodes a UserInput message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + + /** + * Verifies a UserInput message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a UserInput message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UserInput + */ + public static fromObject(object: { [k: string]: any }): google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput; + + /** + * Creates a plain object from a UserInput message. Also converts values to other types if specified. + * @param message UserInput + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UserInput to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UserInput + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UserInput { + + /** QuerySource enum. */ + enum QuerySource { + QUERY_SOURCE_UNSPECIFIED = 0, + AGENT_QUERY = 1, + SUGGESTED_QUERY = 2 + } + } + } + /** Properties of an AnswerFeedback. */ interface IAnswerFeedback { @@ -14869,7 +16553,8 @@ export namespace google { /** SummarizationModel enum. */ enum SummarizationModel { SUMMARIZATION_MODEL_UNSPECIFIED = 0, - BASELINE_MODEL = 1 + BASELINE_MODEL = 1, + BASELINE_MODEL_V2_0 = 2 } } } diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.js b/packages/google-cloud-contactcenterinsights/protos/protos.js index c80dae3633d..b0ea8521112 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.js +++ b/packages/google-cloud-contactcenterinsights/protos/protos.js @@ -791,6 +791,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|exportIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ExportIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ExportIssueModel. + * @function exportIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest} request ExportIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportIssueModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.exportIssueModel = function exportIssueModel(request, callback) { + return this.rpcCall(exportIssueModel, $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ExportIssueModel" }); + + /** + * Calls ExportIssueModel. + * @function exportIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest} request ExportIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|importIssueModel}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef ImportIssueModelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls ImportIssueModel. + * @function importIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest} request ImportIssueModelRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.ImportIssueModelCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.importIssueModel = function importIssueModel(request, callback) { + return this.rpcCall(importIssueModel, $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "ImportIssueModel" }); + + /** + * Calls ImportIssueModel. + * @function importIssueModel + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest} request ImportIssueModelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getIssue}. * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights @@ -1220,6 +1286,72 @@ * @variation 2 */ + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|getEncryptionSpec}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef GetEncryptionSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} [response] EncryptionSpec + */ + + /** + * Calls GetEncryptionSpec. + * @function getEncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} request GetEncryptionSpecRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetEncryptionSpecCallback} callback Node-style callback called with the error, if any, and EncryptionSpec + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.getEncryptionSpec = function getEncryptionSpec(request, callback) { + return this.rpcCall(getEncryptionSpec, $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest, $root.google.cloud.contactcenterinsights.v1.EncryptionSpec, request, callback); + }, "name", { value: "GetEncryptionSpec" }); + + /** + * Calls GetEncryptionSpec. + * @function getEncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} request GetEncryptionSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|initializeEncryptionSpec}. + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @typedef InitializeEncryptionSpecCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.longrunning.Operation} [response] Operation + */ + + /** + * Calls InitializeEncryptionSpec. + * @function initializeEncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} request InitializeEncryptionSpecRequest message or plain object + * @param {google.cloud.contactcenterinsights.v1.ContactCenterInsights.InitializeEncryptionSpecCallback} callback Node-style callback called with the error, if any, and Operation + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(ContactCenterInsights.prototype.initializeEncryptionSpec = function initializeEncryptionSpec(request, callback) { + return this.rpcCall(initializeEncryptionSpec, $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest, $root.google.longrunning.Operation, request, callback); + }, "name", { value: "InitializeEncryptionSpec" }); + + /** + * Calls InitializeEncryptionSpec. + * @function initializeEncryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights + * @instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} request InitializeEncryptionSpecRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + /** * Callback as used by {@link google.cloud.contactcenterinsights.v1.ContactCenterInsights|createView}. * @memberof google.cloud.contactcenterinsights.v1.ContactCenterInsights @@ -3817,6 +3949,7 @@ * @property {number|null} [pageSize] ListConversationsRequest pageSize * @property {string|null} [pageToken] ListConversationsRequest pageToken * @property {string|null} [filter] ListConversationsRequest filter + * @property {string|null} [orderBy] ListConversationsRequest orderBy * @property {google.cloud.contactcenterinsights.v1.ConversationView|null} [view] ListConversationsRequest view */ @@ -3867,6 +4000,14 @@ */ ListConversationsRequest.prototype.filter = ""; + /** + * ListConversationsRequest orderBy. + * @member {string} orderBy + * @memberof google.cloud.contactcenterinsights.v1.ListConversationsRequest + * @instance + */ + ListConversationsRequest.prototype.orderBy = ""; + /** * ListConversationsRequest view. * @member {google.cloud.contactcenterinsights.v1.ConversationView} view @@ -3909,6 +4050,8 @@ writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); if (message.view != null && Object.hasOwnProperty.call(message, "view")) writer.uint32(/* id 5, wireType 0 =*/40).int32(message.view); + if (message.orderBy != null && Object.hasOwnProperty.call(message, "orderBy")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.orderBy); return writer; }; @@ -3959,6 +4102,10 @@ message.filter = reader.string(); break; } + case 7: { + message.orderBy = reader.string(); + break; + } case 5: { message.view = reader.int32(); break; @@ -4010,6 +4157,9 @@ if (message.filter != null && message.hasOwnProperty("filter")) if (!$util.isString(message.filter)) return "filter: string expected"; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + if (!$util.isString(message.orderBy)) + return "orderBy: string expected"; if (message.view != null && message.hasOwnProperty("view")) switch (message.view) { default: @@ -4042,6 +4192,8 @@ message.pageToken = String(object.pageToken); if (object.filter != null) message.filter = String(object.filter); + if (object.orderBy != null) + message.orderBy = String(object.orderBy); switch (object.view) { default: if (typeof object.view === "number") { @@ -4084,6 +4236,7 @@ object.pageToken = ""; object.filter = ""; object.view = options.enums === String ? "CONVERSATION_VIEW_UNSPECIFIED" : 0; + object.orderBy = ""; } if (message.parent != null && message.hasOwnProperty("parent")) object.parent = message.parent; @@ -4095,6 +4248,8 @@ object.filter = message.filter; if (message.view != null && message.hasOwnProperty("view")) object.view = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.ConversationView[message.view] === undefined ? message.view : $root.google.cloud.contactcenterinsights.v1.ConversationView[message.view] : message.view; + if (message.orderBy != null && message.hasOwnProperty("orderBy")) + object.orderBy = message.orderBy; return object; }; @@ -5102,6 +5257,7 @@ * @property {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IConversationConfig|null} [conversationConfig] IngestConversationsRequest conversationConfig * @property {google.cloud.contactcenterinsights.v1.IRedactionConfig|null} [redactionConfig] IngestConversationsRequest redactionConfig * @property {google.cloud.contactcenterinsights.v1.ISpeechConfig|null} [speechConfig] IngestConversationsRequest speechConfig + * @property {number|null} [sampleSize] IngestConversationsRequest sampleSize */ /** @@ -5167,6 +5323,14 @@ */ IngestConversationsRequest.prototype.speechConfig = null; + /** + * IngestConversationsRequest sampleSize. + * @member {number|null|undefined} sampleSize + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @instance + */ + IngestConversationsRequest.prototype.sampleSize = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -5192,6 +5356,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * IngestConversationsRequest _sampleSize. + * @member {"sampleSize"|undefined} _sampleSize + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest + * @instance + */ + Object.defineProperty(IngestConversationsRequest.prototype, "_sampleSize", { + get: $util.oneOfGetter($oneOfFields = ["sampleSize"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new IngestConversationsRequest instance using the specified properties. * @function create @@ -5228,6 +5403,8 @@ $root.google.cloud.contactcenterinsights.v1.RedactionConfig.encode(message.redactionConfig, writer.uint32(/* id 5, wireType 2 =*/42).fork()).ldelim(); if (message.speechConfig != null && Object.hasOwnProperty.call(message, "speechConfig")) $root.google.cloud.contactcenterinsights.v1.SpeechConfig.encode(message.speechConfig, writer.uint32(/* id 6, wireType 2 =*/50).fork()).ldelim(); + if (message.sampleSize != null && Object.hasOwnProperty.call(message, "sampleSize")) + writer.uint32(/* id 7, wireType 0 =*/56).int32(message.sampleSize); return writer; }; @@ -5286,6 +5463,10 @@ message.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.decode(reader, reader.uint32()); break; } + case 7: { + message.sampleSize = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -5356,6 +5537,11 @@ if (error) return "speechConfig." + error; } + if (message.sampleSize != null && message.hasOwnProperty("sampleSize")) { + properties._sampleSize = 1; + if (!$util.isInteger(message.sampleSize)) + return "sampleSize: integer expected"; + } return null; }; @@ -5398,6 +5584,8 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.speechConfig: object expected"); message.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.fromObject(object.speechConfig); } + if (object.sampleSize != null) + message.sampleSize = object.sampleSize | 0; return message; }; @@ -5438,6 +5626,11 @@ object.redactionConfig = $root.google.cloud.contactcenterinsights.v1.RedactionConfig.toObject(message.redactionConfig, options); if (message.speechConfig != null && message.hasOwnProperty("speechConfig")) object.speechConfig = $root.google.cloud.contactcenterinsights.v1.SpeechConfig.toObject(message.speechConfig, options); + if (message.sampleSize != null && message.hasOwnProperty("sampleSize")) { + object.sampleSize = message.sampleSize; + if (options.oneofs) + object._sampleSize = "sampleSize"; + } return object; }; @@ -5475,6 +5668,8 @@ * @interface IGcsSource * @property {string|null} [bucketUri] GcsSource bucketUri * @property {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType|null} [bucketObjectType] GcsSource bucketObjectType + * @property {string|null} [metadataBucketUri] GcsSource metadataBucketUri + * @property {Array.|null} [customMetadataKeys] GcsSource customMetadataKeys */ /** @@ -5486,6 +5681,7 @@ * @param {google.cloud.contactcenterinsights.v1.IngestConversationsRequest.IGcsSource=} [properties] Properties to set */ function GcsSource(properties) { + this.customMetadataKeys = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -5508,6 +5704,36 @@ */ GcsSource.prototype.bucketObjectType = 0; + /** + * GcsSource metadataBucketUri. + * @member {string|null|undefined} metadataBucketUri + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @instance + */ + GcsSource.prototype.metadataBucketUri = null; + + /** + * GcsSource customMetadataKeys. + * @member {Array.} customMetadataKeys + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @instance + */ + GcsSource.prototype.customMetadataKeys = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * GcsSource _metadataBucketUri. + * @member {"metadataBucketUri"|undefined} _metadataBucketUri + * @memberof google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource + * @instance + */ + Object.defineProperty(GcsSource.prototype, "_metadataBucketUri", { + get: $util.oneOfGetter($oneOfFields = ["metadataBucketUri"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new GcsSource instance using the specified properties. * @function create @@ -5536,6 +5762,11 @@ writer.uint32(/* id 1, wireType 2 =*/10).string(message.bucketUri); if (message.bucketObjectType != null && Object.hasOwnProperty.call(message, "bucketObjectType")) writer.uint32(/* id 2, wireType 0 =*/16).int32(message.bucketObjectType); + if (message.metadataBucketUri != null && Object.hasOwnProperty.call(message, "metadataBucketUri")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.metadataBucketUri); + if (message.customMetadataKeys != null && message.customMetadataKeys.length) + for (var i = 0; i < message.customMetadataKeys.length; ++i) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.customMetadataKeys[i]); return writer; }; @@ -5578,6 +5809,16 @@ message.bucketObjectType = reader.int32(); break; } + case 3: { + message.metadataBucketUri = reader.string(); + break; + } + case 12: { + if (!(message.customMetadataKeys && message.customMetadataKeys.length)) + message.customMetadataKeys = []; + message.customMetadataKeys.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -5613,6 +5854,7 @@ GcsSource.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; if (message.bucketUri != null && message.hasOwnProperty("bucketUri")) if (!$util.isString(message.bucketUri)) return "bucketUri: string expected"; @@ -5625,6 +5867,18 @@ case 2: break; } + if (message.metadataBucketUri != null && message.hasOwnProperty("metadataBucketUri")) { + properties._metadataBucketUri = 1; + if (!$util.isString(message.metadataBucketUri)) + return "metadataBucketUri: string expected"; + } + if (message.customMetadataKeys != null && message.hasOwnProperty("customMetadataKeys")) { + if (!Array.isArray(message.customMetadataKeys)) + return "customMetadataKeys: array expected"; + for (var i = 0; i < message.customMetadataKeys.length; ++i) + if (!$util.isString(message.customMetadataKeys[i])) + return "customMetadataKeys: string[] expected"; + } return null; }; @@ -5662,6 +5916,15 @@ message.bucketObjectType = 2; break; } + if (object.metadataBucketUri != null) + message.metadataBucketUri = String(object.metadataBucketUri); + if (object.customMetadataKeys) { + if (!Array.isArray(object.customMetadataKeys)) + throw TypeError(".google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.customMetadataKeys: array expected"); + message.customMetadataKeys = []; + for (var i = 0; i < object.customMetadataKeys.length; ++i) + message.customMetadataKeys[i] = String(object.customMetadataKeys[i]); + } return message; }; @@ -5678,6 +5941,8 @@ if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.customMetadataKeys = []; if (options.defaults) { object.bucketUri = ""; object.bucketObjectType = options.enums === String ? "BUCKET_OBJECT_TYPE_UNSPECIFIED" : 0; @@ -5686,6 +5951,16 @@ object.bucketUri = message.bucketUri; if (message.bucketObjectType != null && message.hasOwnProperty("bucketObjectType")) object.bucketObjectType = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType[message.bucketObjectType] === undefined ? message.bucketObjectType : $root.google.cloud.contactcenterinsights.v1.IngestConversationsRequest.GcsSource.BucketObjectType[message.bucketObjectType] : message.bucketObjectType; + if (message.metadataBucketUri != null && message.hasOwnProperty("metadataBucketUri")) { + object.metadataBucketUri = message.metadataBucketUri; + if (options.oneofs) + object._metadataBucketUri = "metadataBucketUri"; + } + if (message.customMetadataKeys && message.customMetadataKeys.length) { + object.customMetadataKeys = []; + for (var j = 0; j < message.customMetadataKeys.length; ++j) + object.customMetadataKeys[j] = message.customMetadataKeys[j]; + } return object; }; @@ -14015,24 +14290,25 @@ return UndeployIssueModelMetadata; })(); - v1.GetIssueRequest = (function() { + v1.ExportIssueModelRequest = (function() { /** - * Properties of a GetIssueRequest. + * Properties of an ExportIssueModelRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGetIssueRequest - * @property {string|null} [name] GetIssueRequest name + * @interface IExportIssueModelRequest + * @property {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination|null} [gcsDestination] ExportIssueModelRequest gcsDestination + * @property {string|null} [name] ExportIssueModelRequest name */ /** - * Constructs a new GetIssueRequest. + * Constructs a new ExportIssueModelRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GetIssueRequest. - * @implements IGetIssueRequest + * @classdesc Represents an ExportIssueModelRequest. + * @implements IExportIssueModelRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest=} [properties] Properties to set */ - function GetIssueRequest(properties) { + function ExportIssueModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14040,73 +14316,101 @@ } /** - * GetIssueRequest name. + * ExportIssueModelRequest gcsDestination. + * @member {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination|null|undefined} gcsDestination + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest + * @instance + */ + ExportIssueModelRequest.prototype.gcsDestination = null; + + /** + * ExportIssueModelRequest name. * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @instance */ - GetIssueRequest.prototype.name = ""; + ExportIssueModelRequest.prototype.name = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * Creates a new GetIssueRequest instance using the specified properties. + * ExportIssueModelRequest Destination. + * @member {"gcsDestination"|undefined} Destination + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest + * @instance + */ + Object.defineProperty(ExportIssueModelRequest.prototype, "Destination", { + get: $util.oneOfGetter($oneOfFields = ["gcsDestination"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ExportIssueModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest instance + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest} ExportIssueModelRequest instance */ - GetIssueRequest.create = function create(properties) { - return new GetIssueRequest(properties); + ExportIssueModelRequest.create = function create(properties) { + return new ExportIssueModelRequest(properties); }; /** - * Encodes the specified GetIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * Encodes the specified ExportIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} message GetIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest} message ExportIssueModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIssueRequest.encode = function encode(message, writer) { + ExportIssueModelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.gcsDestination != null && Object.hasOwnProperty.call(message, "gcsDestination")) + $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.encode(message.gcsDestination, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * Encodes the specified ExportIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} message GetIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest} message ExportIssueModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetIssueRequest message from the specified reader or buffer. + * Decodes an ExportIssueModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest} ExportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIssueRequest.decode = function decode(reader, length) { + ExportIssueModelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetIssueRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.gcsDestination = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.decode(reader, reader.uint32()); + break; + } case 1: { message.name = reader.string(); break; @@ -14120,32 +14424,41 @@ }; /** - * Decodes a GetIssueRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportIssueModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest} ExportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetIssueRequest.decodeDelimited = function decodeDelimited(reader) { + ExportIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetIssueRequest message. + * Verifies an ExportIssueModelRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetIssueRequest.verify = function verify(message) { + ExportIssueModelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; + var properties = {}; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + properties.Destination = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.verify(message.gcsDestination); + if (error) + return "gcsDestination." + error; + } + } if (message.name != null && message.hasOwnProperty("name")) if (!$util.isString(message.name)) return "name: string expected"; @@ -14153,32 +14466,37 @@ }; /** - * Creates a GetIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIssueModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest} ExportIssueModelRequest */ - GetIssueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetIssueRequest) + ExportIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GetIssueRequest(); + var message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest(); + if (object.gcsDestination != null) { + if (typeof object.gcsDestination !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.gcsDestination: object expected"); + message.gcsDestination = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.fromObject(object.gcsDestination); + } if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a GetIssueRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportIssueModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.GetIssueRequest} message GetIssueRequest + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest} message ExportIssueModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetIssueRequest.toObject = function toObject(message, options) { + ExportIssueModelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -14186,56 +14504,263 @@ object.name = ""; if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; + if (message.gcsDestination != null && message.hasOwnProperty("gcsDestination")) { + object.gcsDestination = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.toObject(message.gcsDestination, options); + if (options.oneofs) + object.Destination = "gcsDestination"; + } return object; }; /** - * Converts this GetIssueRequest to JSON. + * Converts this ExportIssueModelRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @instance * @returns {Object.} JSON object */ - GetIssueRequest.prototype.toJSON = function toJSON() { + ExportIssueModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetIssueRequest + * Gets the default type url for ExportIssueModelRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetIssueRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportIssueModelRequest"; }; - return GetIssueRequest; + ExportIssueModelRequest.GcsDestination = (function() { + + /** + * Properties of a GcsDestination. + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest + * @interface IGcsDestination + * @property {string|null} [objectUri] GcsDestination objectUri + */ + + /** + * Constructs a new GcsDestination. + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest + * @classdesc Represents a GcsDestination. + * @implements IGcsDestination + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination=} [properties] Properties to set + */ + function GcsDestination(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsDestination objectUri. + * @member {string} objectUri + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @instance + */ + GcsDestination.prototype.objectUri = ""; + + /** + * Creates a new GcsDestination instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} GcsDestination instance + */ + GcsDestination.create = function create(properties) { + return new GcsDestination(properties); + }; + + /** + * Encodes the specified GcsDestination message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.objectUri != null && Object.hasOwnProperty.call(message, "objectUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.objectUri); + return writer; + }; + + /** + * Encodes the specified GcsDestination message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.IGcsDestination} message GcsDestination message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsDestination.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.objectUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsDestination message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} GcsDestination + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsDestination.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsDestination message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsDestination.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + if (!$util.isString(message.objectUri)) + return "objectUri: string expected"; + return null; + }; + + /** + * Creates a GcsDestination message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} GcsDestination + */ + GcsDestination.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination(); + if (object.objectUri != null) + message.objectUri = String(object.objectUri); + return message; + }; + + /** + * Creates a plain object from a GcsDestination message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} message GcsDestination + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsDestination.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.objectUri = ""; + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + object.objectUri = message.objectUri; + return object; + }; + + /** + * Converts this GcsDestination to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @instance + * @returns {Object.} JSON object + */ + GcsDestination.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsDestination + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsDestination.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination"; + }; + + return GcsDestination; + })(); + + return ExportIssueModelRequest; })(); - v1.ListIssuesRequest = (function() { + v1.ExportIssueModelResponse = (function() { /** - * Properties of a ListIssuesRequest. + * Properties of an ExportIssueModelResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListIssuesRequest - * @property {string|null} [parent] ListIssuesRequest parent + * @interface IExportIssueModelResponse */ /** - * Constructs a new ListIssuesRequest. + * Constructs a new ExportIssueModelResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListIssuesRequest. - * @implements IListIssuesRequest + * @classdesc Represents an ExportIssueModelResponse. + * @implements IExportIssueModelResponse * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelResponse=} [properties] Properties to set */ - function ListIssuesRequest(properties) { + function ExportIssueModelResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14243,77 +14768,63 @@ } /** - * ListIssuesRequest parent. - * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest - * @instance - */ - ListIssuesRequest.prototype.parent = ""; - - /** - * Creates a new ListIssuesRequest instance using the specified properties. + * Creates a new ExportIssueModelResponse instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest instance + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelResponse} ExportIssueModelResponse instance */ - ListIssuesRequest.create = function create(properties) { - return new ListIssuesRequest(properties); + ExportIssueModelResponse.create = function create(properties) { + return new ExportIssueModelResponse(properties); }; /** - * Encodes the specified ListIssuesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * Encodes the specified ExportIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} message ListIssuesRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelResponse} message ExportIssueModelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIssuesRequest.encode = function encode(message, writer) { + ExportIssueModelResponse.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); return writer; }; /** - * Encodes the specified ListIssuesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * Encodes the specified ExportIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} message ListIssuesRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelResponse} message ExportIssueModelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIssuesRequest.encodeDelimited = function encodeDelimited(message, writer) { + ExportIssueModelResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIssuesRequest message from the specified reader or buffer. + * Decodes an ExportIssueModelResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelResponse} ExportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIssuesRequest.decode = function decode(reader, length) { + ExportIssueModelResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.parent = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -14323,123 +14834,111 @@ }; /** - * Decodes a ListIssuesRequest message from the specified reader or buffer, length delimited. + * Decodes an ExportIssueModelResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelResponse} ExportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIssuesRequest.decodeDelimited = function decodeDelimited(reader) { + ExportIssueModelResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIssuesRequest message. + * Verifies an ExportIssueModelResponse message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListIssuesRequest.verify = function verify(message) { + ExportIssueModelResponse.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"; return null; }; /** - * Creates a ListIssuesRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIssueModelResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelResponse} ExportIssueModelResponse */ - ListIssuesRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest) + ExportIssueModelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest(); - if (object.parent != null) - message.parent = String(object.parent); - return message; + return new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse(); }; /** - * Creates a plain object from a ListIssuesRequest message. Also converts values to other types if specified. + * Creates a plain object from an ExportIssueModelResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.ListIssuesRequest} message ListIssuesRequest + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelResponse} message ExportIssueModelResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIssuesRequest.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) - object.parent = ""; - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - return object; + ExportIssueModelResponse.toObject = function toObject() { + return {}; }; /** - * Converts this ListIssuesRequest to JSON. + * Converts this ExportIssueModelResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @instance * @returns {Object.} JSON object */ - ListIssuesRequest.prototype.toJSON = function toJSON() { + ExportIssueModelResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListIssuesRequest + * Gets the default type url for ExportIssueModelResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListIssuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportIssueModelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssuesRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportIssueModelResponse"; }; - return ListIssuesRequest; + return ExportIssueModelResponse; })(); - v1.ListIssuesResponse = (function() { + v1.ExportIssueModelMetadata = (function() { /** - * Properties of a ListIssuesResponse. + * Properties of an ExportIssueModelMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListIssuesResponse - * @property {Array.|null} [issues] ListIssuesResponse issues + * @interface IExportIssueModelMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ExportIssueModelMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] ExportIssueModelMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest|null} [request] ExportIssueModelMetadata request */ /** - * Constructs a new ListIssuesResponse. + * Constructs a new ExportIssueModelMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListIssuesResponse. - * @implements IListIssuesResponse + * @classdesc Represents an ExportIssueModelMetadata. + * @implements IExportIssueModelMetadata * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata=} [properties] Properties to set */ - function ListIssuesResponse(properties) { - this.issues = []; + function ExportIssueModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14447,78 +14946,103 @@ } /** - * ListIssuesResponse issues. - * @member {Array.} issues - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * ExportIssueModelMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @instance */ - ListIssuesResponse.prototype.issues = $util.emptyArray; + ExportIssueModelMetadata.prototype.createTime = null; /** - * Creates a new ListIssuesResponse instance using the specified properties. + * ExportIssueModelMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata + * @instance + */ + ExportIssueModelMetadata.prototype.endTime = null; + + /** + * ExportIssueModelMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IExportIssueModelRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata + * @instance + */ + ExportIssueModelMetadata.prototype.request = null; + + /** + * Creates a new ExportIssueModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse instance + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata} ExportIssueModelMetadata instance */ - ListIssuesResponse.create = function create(properties) { - return new ListIssuesResponse(properties); + ExportIssueModelMetadata.create = function create(properties) { + return new ExportIssueModelMetadata(properties); }; /** - * Encodes the specified ListIssuesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * Encodes the specified ExportIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse} message ListIssuesResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata} message ExportIssueModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIssuesResponse.encode = function encode(message, writer) { + ExportIssueModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issues != null && message.issues.length) - for (var i = 0; i < message.issues.length; ++i) - $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListIssuesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * Encodes the specified ExportIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse} message ListIssuesResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata} message ExportIssueModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListIssuesResponse.encodeDelimited = function encodeDelimited(message, writer) { + ExportIssueModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListIssuesResponse message from the specified reader or buffer. + * Decodes an ExportIssueModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata} ExportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIssuesResponse.decode = function decode(reader, length) { + ExportIssueModelMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.issues && message.issues.length)) - message.issues = []; - message.issues.push($root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32())); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.decode(reader, reader.uint32()); break; } default: @@ -14530,140 +15054,156 @@ }; /** - * Decodes a ListIssuesResponse message from the specified reader or buffer, length delimited. + * Decodes an ExportIssueModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata} ExportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListIssuesResponse.decodeDelimited = function decodeDelimited(reader) { + ExportIssueModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListIssuesResponse message. + * Verifies an ExportIssueModelMetadata message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListIssuesResponse.verify = function verify(message) { + ExportIssueModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issues != null && message.hasOwnProperty("issues")) { - if (!Array.isArray(message.issues)) - return "issues: array expected"; - for (var i = 0; i < message.issues.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issues[i]); - if (error) - return "issues." + error; - } + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.verify(message.request); + if (error) + return "request." + error; } return null; }; /** - * Creates a ListIssuesResponse message from a plain object. Also converts values to their respective internal types. + * Creates an ExportIssueModelMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @returns {google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata} ExportIssueModelMetadata */ - ListIssuesResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse) + ExportIssueModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse(); - if (object.issues) { - if (!Array.isArray(object.issues)) - throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssuesResponse.issues: array expected"); - message.issues = []; - for (var i = 0; i < object.issues.length; ++i) { - if (typeof object.issues[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssuesResponse.issues: object expected"); - message.issues[i] = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issues[i]); - } + var message = new $root.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.fromObject(object.request); } return message; }; /** - * Creates a plain object from a ListIssuesResponse message. Also converts values to other types if specified. + * Creates a plain object from an ExportIssueModelMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.ListIssuesResponse} message ListIssuesResponse + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata} message ExportIssueModelMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListIssuesResponse.toObject = function toObject(message, options) { + ExportIssueModelMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.issues = []; - if (message.issues && message.issues.length) { - object.issues = []; - for (var j = 0; j < message.issues.length; ++j) - object.issues[j] = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issues[j], options); + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.toObject(message.request, options); return object; }; /** - * Converts this ListIssuesResponse to JSON. + * Converts this ExportIssueModelMetadata to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @instance * @returns {Object.} JSON object */ - ListIssuesResponse.prototype.toJSON = function toJSON() { + ExportIssueModelMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListIssuesResponse + * Gets the default type url for ExportIssueModelMetadata * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @memberof google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListIssuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ExportIssueModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssuesResponse"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata"; }; - return ListIssuesResponse; + return ExportIssueModelMetadata; })(); - v1.UpdateIssueRequest = (function() { + v1.ImportIssueModelRequest = (function() { /** - * Properties of an UpdateIssueRequest. + * Properties of an ImportIssueModelRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IUpdateIssueRequest - * @property {google.cloud.contactcenterinsights.v1.IIssue|null} [issue] UpdateIssueRequest issue - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIssueRequest updateMask + * @interface IImportIssueModelRequest + * @property {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource|null} [gcsSource] ImportIssueModelRequest gcsSource + * @property {string|null} [parent] ImportIssueModelRequest parent + * @property {boolean|null} [createNewModel] ImportIssueModelRequest createNewModel */ /** - * Constructs a new UpdateIssueRequest. + * Constructs a new ImportIssueModelRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an UpdateIssueRequest. - * @implements IUpdateIssueRequest + * @classdesc Represents an ImportIssueModelRequest. + * @implements IImportIssueModelRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest=} [properties] Properties to set */ - function UpdateIssueRequest(properties) { + function ImportIssueModelRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14671,89 +15211,117 @@ } /** - * UpdateIssueRequest issue. - * @member {google.cloud.contactcenterinsights.v1.IIssue|null|undefined} issue - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * ImportIssueModelRequest gcsSource. + * @member {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource|null|undefined} gcsSource + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @instance */ - UpdateIssueRequest.prototype.issue = null; + ImportIssueModelRequest.prototype.gcsSource = null; /** - * UpdateIssueRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * ImportIssueModelRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @instance */ - UpdateIssueRequest.prototype.updateMask = null; + ImportIssueModelRequest.prototype.parent = ""; /** - * Creates a new UpdateIssueRequest instance using the specified properties. + * ImportIssueModelRequest createNewModel. + * @member {boolean} createNewModel + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest + * @instance + */ + ImportIssueModelRequest.prototype.createNewModel = false; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ImportIssueModelRequest Source. + * @member {"gcsSource"|undefined} Source + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest + * @instance + */ + Object.defineProperty(ImportIssueModelRequest.prototype, "Source", { + get: $util.oneOfGetter($oneOfFields = ["gcsSource"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ImportIssueModelRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest instance + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest} ImportIssueModelRequest instance */ - UpdateIssueRequest.create = function create(properties) { - return new UpdateIssueRequest(properties); + ImportIssueModelRequest.create = function create(properties) { + return new ImportIssueModelRequest(properties); }; /** - * Encodes the specified UpdateIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * Encodes the specified ImportIssueModelRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest} message ImportIssueModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIssueRequest.encode = function encode(message, writer) { + ImportIssueModelRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) - $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.gcsSource != null && Object.hasOwnProperty.call(message, "gcsSource")) + $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.encode(message.gcsSource, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createNewModel != null && Object.hasOwnProperty.call(message, "createNewModel")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.createNewModel); return writer; }; /** - * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * Encodes the specified ImportIssueModelRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest} message ImportIssueModelRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportIssueModelRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * Decodes an ImportIssueModelRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest} ImportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIssueRequest.decode = function decode(reader, length) { + ImportIssueModelRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { + case 2: { + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.decode(reader, reader.uint32()); + break; + } case 1: { - message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32()); + message.parent = reader.string(); break; } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + case 3: { + message.createNewModel = reader.bool(); break; } default: @@ -14765,141 +15333,352 @@ }; /** - * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportIssueModelRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest} ImportIssueModelRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateIssueRequest.decodeDelimited = function decodeDelimited(reader) { + ImportIssueModelRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateIssueRequest message. + * Verifies an ImportIssueModelRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateIssueRequest.verify = function verify(message) { + ImportIssueModelRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issue != null && message.hasOwnProperty("issue")) { - var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issue); - if (error) - return "issue." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); - if (error) - return "updateMask." + error; + var properties = {}; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + properties.Source = 1; + { + var error = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.verify(message.gcsSource); + if (error) + return "gcsSource." + error; + } } + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.createNewModel != null && message.hasOwnProperty("createNewModel")) + if (typeof message.createNewModel !== "boolean") + return "createNewModel: boolean expected"; return null; }; /** - * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIssueModelRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest} ImportIssueModelRequest */ - UpdateIssueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest) + ImportIssueModelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); - if (object.issue != null) { - if (typeof object.issue !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.issue: object expected"); - message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issue); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest(); + if (object.gcsSource != null) { + if (typeof object.gcsSource !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.gcsSource: object expected"); + message.gcsSource = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.fromObject(object.gcsSource); } + if (object.parent != null) + message.parent = String(object.parent); + if (object.createNewModel != null) + message.createNewModel = Boolean(object.createNewModel); return message; }; /** - * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportIssueModelRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static - * @param {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} message UpdateIssueRequest + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest} message ImportIssueModelRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateIssueRequest.toObject = function toObject(message, options) { + ImportIssueModelRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.issue = null; - object.updateMask = null; + object.parent = ""; + object.createNewModel = false; } - if (message.issue != null && message.hasOwnProperty("issue")) - object.issue = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issue, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.gcsSource != null && message.hasOwnProperty("gcsSource")) { + object.gcsSource = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.toObject(message.gcsSource, options); + if (options.oneofs) + object.Source = "gcsSource"; + } + if (message.createNewModel != null && message.hasOwnProperty("createNewModel")) + object.createNewModel = message.createNewModel; return object; }; /** - * Converts this UpdateIssueRequest to JSON. + * Converts this ImportIssueModelRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @instance * @returns {Object.} JSON object */ - UpdateIssueRequest.prototype.toJSON = function toJSON() { + ImportIssueModelRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateIssueRequest + * Gets the default type url for ImportIssueModelRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportIssueModelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateIssueRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ImportIssueModelRequest"; }; - return UpdateIssueRequest; + ImportIssueModelRequest.GcsSource = (function() { + + /** + * Properties of a GcsSource. + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest + * @interface IGcsSource + * @property {string|null} [objectUri] GcsSource objectUri + */ + + /** + * Constructs a new GcsSource. + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest + * @classdesc Represents a GcsSource. + * @implements IGcsSource + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource=} [properties] Properties to set + */ + function GcsSource(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GcsSource objectUri. + * @member {string} objectUri + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @instance + */ + GcsSource.prototype.objectUri = ""; + + /** + * Creates a new GcsSource instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} GcsSource instance + */ + GcsSource.create = function create(properties) { + return new GcsSource(properties); + }; + + /** + * Encodes the specified GcsSource message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.objectUri != null && Object.hasOwnProperty.call(message, "objectUri")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.objectUri); + return writer; + }; + + /** + * Encodes the specified GcsSource message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.IGcsSource} message GcsSource message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GcsSource.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.objectUri = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GcsSource message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} GcsSource + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GcsSource.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GcsSource message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GcsSource.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + if (!$util.isString(message.objectUri)) + return "objectUri: string expected"; + return null; + }; + + /** + * Creates a GcsSource message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} GcsSource + */ + GcsSource.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource(); + if (object.objectUri != null) + message.objectUri = String(object.objectUri); + return message; + }; + + /** + * Creates a plain object from a GcsSource message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} message GcsSource + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GcsSource.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.objectUri = ""; + if (message.objectUri != null && message.hasOwnProperty("objectUri")) + object.objectUri = message.objectUri; + return object; + }; + + /** + * Converts this GcsSource to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @instance + * @returns {Object.} JSON object + */ + GcsSource.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GcsSource + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GcsSource.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource"; + }; + + return GcsSource; + })(); + + return ImportIssueModelRequest; })(); - v1.DeleteIssueRequest = (function() { + v1.ImportIssueModelResponse = (function() { /** - * Properties of a DeleteIssueRequest. + * Properties of an ImportIssueModelResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDeleteIssueRequest - * @property {string|null} [name] DeleteIssueRequest name + * @interface IImportIssueModelResponse */ /** - * Constructs a new DeleteIssueRequest. + * Constructs a new ImportIssueModelResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DeleteIssueRequest. - * @implements IDeleteIssueRequest + * @classdesc Represents an ImportIssueModelResponse. + * @implements IImportIssueModelResponse * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelResponse=} [properties] Properties to set */ - function DeleteIssueRequest(properties) { + function ImportIssueModelResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -14907,77 +15686,63 @@ } /** - * DeleteIssueRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest - * @instance - */ - DeleteIssueRequest.prototype.name = ""; - - /** - * Creates a new DeleteIssueRequest instance using the specified properties. + * Creates a new ImportIssueModelResponse instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest instance + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelResponse} ImportIssueModelResponse instance */ - DeleteIssueRequest.create = function create(properties) { - return new DeleteIssueRequest(properties); + ImportIssueModelResponse.create = function create(properties) { + return new ImportIssueModelResponse(properties); }; /** - * Encodes the specified DeleteIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * Encodes the specified ImportIssueModelResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} message DeleteIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelResponse} message ImportIssueModelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIssueRequest.encode = function encode(message, writer) { + ImportIssueModelResponse.encode = function encode(message, writer) { 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 DeleteIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * Encodes the specified ImportIssueModelResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} message DeleteIssueRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelResponse} message ImportIssueModelResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeleteIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportIssueModelResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeleteIssueRequest message from the specified reader or buffer. + * Decodes an ImportIssueModelResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelResponse} ImportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteIssueRequest.decode = function decode(reader, length) { + ImportIssueModelResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -14987,122 +15752,111 @@ }; /** - * Decodes a DeleteIssueRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportIssueModelResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelResponse} ImportIssueModelResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeleteIssueRequest.decodeDelimited = function decodeDelimited(reader) { + ImportIssueModelResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeleteIssueRequest message. + * Verifies an ImportIssueModelResponse message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeleteIssueRequest.verify = function verify(message) { + ImportIssueModelResponse.verify = function verify(message) { if (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 DeleteIssueRequest message from a plain object. Also converts values to their respective internal types. + * Creates an ImportIssueModelResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelResponse} ImportIssueModelResponse */ - DeleteIssueRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest) + ImportIssueModelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse(); }; /** - * Creates a plain object from a DeleteIssueRequest message. Also converts values to other types if specified. + * Creates a plain object from an ImportIssueModelResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static - * @param {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} message DeleteIssueRequest + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelResponse} message ImportIssueModelResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeleteIssueRequest.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; + ImportIssueModelResponse.toObject = function toObject() { + return {}; }; /** - * Converts this DeleteIssueRequest to JSON. + * Converts this ImportIssueModelResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @instance * @returns {Object.} JSON object */ - DeleteIssueRequest.prototype.toJSON = function toJSON() { + ImportIssueModelResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeleteIssueRequest + * Gets the default type url for ImportIssueModelResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeleteIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ImportIssueModelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteIssueRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ImportIssueModelResponse"; }; - return DeleteIssueRequest; + return ImportIssueModelResponse; })(); - v1.CalculateIssueModelStatsRequest = (function() { + v1.ImportIssueModelMetadata = (function() { /** - * Properties of a CalculateIssueModelStatsRequest. + * Properties of an ImportIssueModelMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICalculateIssueModelStatsRequest - * @property {string|null} [issueModel] CalculateIssueModelStatsRequest issueModel + * @interface IImportIssueModelMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] ImportIssueModelMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] ImportIssueModelMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest|null} [request] ImportIssueModelMetadata request */ /** - * Constructs a new CalculateIssueModelStatsRequest. + * Constructs a new ImportIssueModelMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CalculateIssueModelStatsRequest. - * @implements ICalculateIssueModelStatsRequest + * @classdesc Represents an ImportIssueModelMetadata. + * @implements IImportIssueModelMetadata * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata=} [properties] Properties to set */ - function CalculateIssueModelStatsRequest(properties) { + function ImportIssueModelMetadata(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15110,75 +15864,103 @@ } /** - * CalculateIssueModelStatsRequest issueModel. - * @member {string} issueModel - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * ImportIssueModelMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @instance */ - CalculateIssueModelStatsRequest.prototype.issueModel = ""; + ImportIssueModelMetadata.prototype.createTime = null; /** - * Creates a new CalculateIssueModelStatsRequest instance using the specified properties. + * ImportIssueModelMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + * @instance + */ + ImportIssueModelMetadata.prototype.endTime = null; + + /** + * ImportIssueModelMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IImportIssueModelRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + * @instance + */ + ImportIssueModelMetadata.prototype.request = null; + + /** + * Creates a new ImportIssueModelMetadata instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest instance + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata} ImportIssueModelMetadata instance */ - CalculateIssueModelStatsRequest.create = function create(properties) { - return new CalculateIssueModelStatsRequest(properties); + ImportIssueModelMetadata.create = function create(properties) { + return new ImportIssueModelMetadata(properties); }; /** - * Encodes the specified CalculateIssueModelStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * Encodes the specified ImportIssueModelMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata} message ImportIssueModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateIssueModelStatsRequest.encode = function encode(message, writer) { + ImportIssueModelMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueModel); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified CalculateIssueModelStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * Encodes the specified ImportIssueModelMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata} message ImportIssueModelMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateIssueModelStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + ImportIssueModelMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer. + * Decodes an ImportIssueModelMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata} ImportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateIssueModelStatsRequest.decode = function decode(reader, length) { + ImportIssueModelMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.issueModel = reader.string(); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 2: { + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.decode(reader, reader.uint32()); break; } default: @@ -15190,122 +15972,2388 @@ }; /** - * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer, length delimited. + * Decodes an ImportIssueModelMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata} ImportIssueModelMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateIssueModelStatsRequest.decodeDelimited = function decodeDelimited(reader) { + ImportIssueModelMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CalculateIssueModelStatsRequest message. + * Verifies an ImportIssueModelMetadata message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CalculateIssueModelStatsRequest.verify = function verify(message) { + ImportIssueModelMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.issueModel != null && message.hasOwnProperty("issueModel")) - if (!$util.isString(message.issueModel)) - return "issueModel: string expected"; - return null; - }; + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); + if (error) + return "createTime." + error; + } + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); + if (error) + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.verify(message.request); + if (error) + return "request." + error; + } + return null; + }; + + /** + * Creates an ImportIssueModelMetadata message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata} ImportIssueModelMetadata + */ + ImportIssueModelMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); + } + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.fromObject(object.request); + } + return message; + }; + + /** + * Creates a plain object from an ImportIssueModelMetadata message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + * @static + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata} message ImportIssueModelMetadata + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ImportIssueModelMetadata.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.toObject(message.request, options); + return object; + }; + + /** + * Converts this ImportIssueModelMetadata to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + * @instance + * @returns {Object.} JSON object + */ + ImportIssueModelMetadata.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ImportIssueModelMetadata + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ImportIssueModelMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata"; + }; + + return ImportIssueModelMetadata; + })(); + + v1.GetIssueRequest = (function() { + + /** + * Properties of a GetIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IGetIssueRequest + * @property {string|null} [name] GetIssueRequest name + */ + + /** + * Constructs a new GetIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a GetIssueRequest. + * @implements IGetIssueRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest=} [properties] Properties to set + */ + function GetIssueRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetIssueRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @instance + */ + GetIssueRequest.prototype.name = ""; + + /** + * Creates a new GetIssueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest instance + */ + GetIssueRequest.create = function create(properties) { + return new GetIssueRequest(properties); + }; + + /** + * Encodes the specified GetIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} message GetIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIssueRequest.encode = function encode(message, writer) { + 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 GetIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetIssueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IGetIssueRequest} message GetIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetIssueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIssueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetIssueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetIssueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetIssueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetIssueRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetIssueRequest.verify = function verify(message) { + if (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 GetIssueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.GetIssueRequest} GetIssueRequest + */ + GetIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetIssueRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.GetIssueRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetIssueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.GetIssueRequest} message GetIssueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetIssueRequest.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 GetIssueRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @instance + * @returns {Object.} JSON object + */ + GetIssueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetIssueRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.GetIssueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetIssueRequest"; + }; + + return GetIssueRequest; + })(); + + v1.ListIssuesRequest = (function() { + + /** + * Properties of a ListIssuesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListIssuesRequest + * @property {string|null} [parent] ListIssuesRequest parent + */ + + /** + * Constructs a new ListIssuesRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListIssuesRequest. + * @implements IListIssuesRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest=} [properties] Properties to set + */ + function ListIssuesRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListIssuesRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @instance + */ + ListIssuesRequest.prototype.parent = ""; + + /** + * Creates a new ListIssuesRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest instance + */ + ListIssuesRequest.create = function create(properties) { + return new ListIssuesRequest(properties); + }; + + /** + * Encodes the specified ListIssuesRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} message ListIssuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesRequest.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); + return writer; + }; + + /** + * Encodes the specified ListIssuesRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesRequest} message ListIssuesRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListIssuesRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListIssuesRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIssuesRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListIssuesRequest.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"; + return null; + }; + + /** + * Creates a ListIssuesRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesRequest} ListIssuesRequest + */ + ListIssuesRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesRequest(); + if (object.parent != null) + message.parent = String(object.parent); + return message; + }; + + /** + * Creates a plain object from a ListIssuesRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListIssuesRequest} message ListIssuesRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIssuesRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.parent = ""; + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + return object; + }; + + /** + * Converts this ListIssuesRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @instance + * @returns {Object.} JSON object + */ + ListIssuesRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListIssuesRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIssuesRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssuesRequest"; + }; + + return ListIssuesRequest; + })(); + + v1.ListIssuesResponse = (function() { + + /** + * Properties of a ListIssuesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListIssuesResponse + * @property {Array.|null} [issues] ListIssuesResponse issues + */ + + /** + * Constructs a new ListIssuesResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListIssuesResponse. + * @implements IListIssuesResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse=} [properties] Properties to set + */ + function ListIssuesResponse(properties) { + this.issues = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListIssuesResponse issues. + * @member {Array.} issues + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @instance + */ + ListIssuesResponse.prototype.issues = $util.emptyArray; + + /** + * Creates a new ListIssuesResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse instance + */ + ListIssuesResponse.create = function create(properties) { + return new ListIssuesResponse(properties); + }; + + /** + * Encodes the specified ListIssuesResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse} message ListIssuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issues != null && message.issues.length) + for (var i = 0; i < message.issues.length; ++i) + $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issues[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ListIssuesResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListIssuesResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListIssuesResponse} message ListIssuesResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListIssuesResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.issues && message.issues.length)) + message.issues = []; + message.issues.push($root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListIssuesResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListIssuesResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListIssuesResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListIssuesResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issues != null && message.hasOwnProperty("issues")) { + if (!Array.isArray(message.issues)) + return "issues: array expected"; + for (var i = 0; i < message.issues.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issues[i]); + if (error) + return "issues." + error; + } + } + return null; + }; + + /** + * Creates a ListIssuesResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListIssuesResponse} ListIssuesResponse + */ + ListIssuesResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListIssuesResponse(); + if (object.issues) { + if (!Array.isArray(object.issues)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssuesResponse.issues: array expected"); + message.issues = []; + for (var i = 0; i < object.issues.length; ++i) { + if (typeof object.issues[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListIssuesResponse.issues: object expected"); + message.issues[i] = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issues[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a ListIssuesResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ListIssuesResponse} message ListIssuesResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListIssuesResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.issues = []; + if (message.issues && message.issues.length) { + object.issues = []; + for (var j = 0; j < message.issues.length; ++j) + object.issues[j] = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issues[j], options); + } + return object; + }; + + /** + * Converts this ListIssuesResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @instance + * @returns {Object.} JSON object + */ + ListIssuesResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListIssuesResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListIssuesResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListIssuesResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListIssuesResponse"; + }; + + return ListIssuesResponse; + })(); + + v1.UpdateIssueRequest = (function() { + + /** + * Properties of an UpdateIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IUpdateIssueRequest + * @property {google.cloud.contactcenterinsights.v1.IIssue|null} [issue] UpdateIssueRequest issue + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateIssueRequest updateMask + */ + + /** + * Constructs a new UpdateIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an UpdateIssueRequest. + * @implements IUpdateIssueRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest=} [properties] Properties to set + */ + function UpdateIssueRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UpdateIssueRequest issue. + * @member {google.cloud.contactcenterinsights.v1.IIssue|null|undefined} issue + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + */ + UpdateIssueRequest.prototype.issue = null; + + /** + * UpdateIssueRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + */ + UpdateIssueRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateIssueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest instance + */ + UpdateIssueRequest.create = function create(properties) { + return new UpdateIssueRequest(properties); + }; + + /** + * Encodes the specified UpdateIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issue != null && Object.hasOwnProperty.call(message, "issue")) + $root.google.cloud.contactcenterinsights.v1.Issue.encode(message.issue, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified UpdateIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateIssueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IUpdateIssueRequest} message UpdateIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UpdateIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UpdateIssueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UpdateIssueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UpdateIssueRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UpdateIssueRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issue != null && message.hasOwnProperty("issue")) { + var error = $root.google.cloud.contactcenterinsights.v1.Issue.verify(message.issue); + if (error) + return "issue." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } + return null; + }; + + /** + * Creates an UpdateIssueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} UpdateIssueRequest + */ + UpdateIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateIssueRequest(); + if (object.issue != null) { + if (typeof object.issue !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.issue: object expected"); + message.issue = $root.google.cloud.contactcenterinsights.v1.Issue.fromObject(object.issue); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateIssueRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } + return message; + }; + + /** + * Creates a plain object from an UpdateIssueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.UpdateIssueRequest} message UpdateIssueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UpdateIssueRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.issue = null; + object.updateMask = null; + } + if (message.issue != null && message.hasOwnProperty("issue")) + object.issue = $root.google.cloud.contactcenterinsights.v1.Issue.toObject(message.issue, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + return object; + }; + + /** + * Converts this UpdateIssueRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @instance + * @returns {Object.} JSON object + */ + UpdateIssueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UpdateIssueRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.UpdateIssueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UpdateIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateIssueRequest"; + }; + + return UpdateIssueRequest; + })(); + + v1.DeleteIssueRequest = (function() { + + /** + * Properties of a DeleteIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IDeleteIssueRequest + * @property {string|null} [name] DeleteIssueRequest name + */ + + /** + * Constructs a new DeleteIssueRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a DeleteIssueRequest. + * @implements IDeleteIssueRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest=} [properties] Properties to set + */ + function DeleteIssueRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteIssueRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @instance + */ + DeleteIssueRequest.prototype.name = ""; + + /** + * Creates a new DeleteIssueRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest instance + */ + DeleteIssueRequest.create = function create(properties) { + return new DeleteIssueRequest(properties); + }; + + /** + * Encodes the specified DeleteIssueRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} message DeleteIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIssueRequest.encode = function encode(message, writer) { + 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 DeleteIssueRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeleteIssueRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IDeleteIssueRequest} message DeleteIssueRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteIssueRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteIssueRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIssueRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteIssueRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteIssueRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteIssueRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteIssueRequest.verify = function verify(message) { + if (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 DeleteIssueRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} DeleteIssueRequest + */ + DeleteIssueRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.DeleteIssueRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteIssueRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.DeleteIssueRequest} message DeleteIssueRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteIssueRequest.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 DeleteIssueRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteIssueRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteIssueRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.DeleteIssueRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteIssueRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeleteIssueRequest"; + }; + + return DeleteIssueRequest; + })(); + + v1.CalculateIssueModelStatsRequest = (function() { + + /** + * Properties of a CalculateIssueModelStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateIssueModelStatsRequest + * @property {string|null} [issueModel] CalculateIssueModelStatsRequest issueModel + */ + + /** + * Constructs a new CalculateIssueModelStatsRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateIssueModelStatsRequest. + * @implements ICalculateIssueModelStatsRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest=} [properties] Properties to set + */ + function CalculateIssueModelStatsRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateIssueModelStatsRequest issueModel. + * @member {string} issueModel + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @instance + */ + CalculateIssueModelStatsRequest.prototype.issueModel = ""; + + /** + * Creates a new CalculateIssueModelStatsRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest instance + */ + CalculateIssueModelStatsRequest.create = function create(properties) { + return new CalculateIssueModelStatsRequest(properties); + }; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.issueModel != null && Object.hasOwnProperty.call(message, "issueModel")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.issueModel); + return writer; + }; + + /** + * Encodes the specified CalculateIssueModelStatsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.issueModel = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateIssueModelStatsRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateIssueModelStatsRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateIssueModelStatsRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + if (!$util.isString(message.issueModel)) + return "issueModel: string expected"; + return null; + }; + + /** + * Creates a CalculateIssueModelStatsRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + */ + CalculateIssueModelStatsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest(); + if (object.issueModel != null) + message.issueModel = String(object.issueModel); + return message; + }; + + /** + * Creates a plain object from a CalculateIssueModelStatsRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateIssueModelStatsRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.issueModel = ""; + if (message.issueModel != null && message.hasOwnProperty("issueModel")) + object.issueModel = message.issueModel; + return object; + }; + + /** + * Converts this CalculateIssueModelStatsRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @instance + * @returns {Object.} JSON object + */ + CalculateIssueModelStatsRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateIssueModelStatsRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateIssueModelStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest"; + }; + + return CalculateIssueModelStatsRequest; + })(); + + v1.CalculateIssueModelStatsResponse = (function() { + + /** + * Properties of a CalculateIssueModelStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICalculateIssueModelStatsResponse + * @property {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null} [currentStats] CalculateIssueModelStatsResponse currentStats + */ + + /** + * Constructs a new CalculateIssueModelStatsResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CalculateIssueModelStatsResponse. + * @implements ICalculateIssueModelStatsResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse=} [properties] Properties to set + */ + function CalculateIssueModelStatsResponse(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CalculateIssueModelStatsResponse currentStats. + * @member {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null|undefined} currentStats + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @instance + */ + CalculateIssueModelStatsResponse.prototype.currentStats = null; + + /** + * Creates a new CalculateIssueModelStatsResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse instance + */ + CalculateIssueModelStatsResponse.create = function create(properties) { + return new CalculateIssueModelStatsResponse(properties); + }; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.currentStats != null && Object.hasOwnProperty.call(message, "currentStats")) + $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.encode(message.currentStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CalculateIssueModelStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CalculateIssueModelStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 4: { + message.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CalculateIssueModelStatsResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CalculateIssueModelStatsResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CalculateIssueModelStatsResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.currentStats != null && message.hasOwnProperty("currentStats")) { + var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify(message.currentStats); + if (error) + return "currentStats." + error; + } + return null; + }; + + /** + * Creates a CalculateIssueModelStatsResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + */ + CalculateIssueModelStatsResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse(); + if (object.currentStats != null) { + if (typeof object.currentStats !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.currentStats: object expected"); + message.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.fromObject(object.currentStats); + } + return message; + }; + + /** + * Creates a plain object from a CalculateIssueModelStatsResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CalculateIssueModelStatsResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.currentStats = null; + if (message.currentStats != null && message.hasOwnProperty("currentStats")) + object.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.toObject(message.currentStats, options); + return object; + }; + + /** + * Converts this CalculateIssueModelStatsResponse to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @instance + * @returns {Object.} JSON object + */ + CalculateIssueModelStatsResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CalculateIssueModelStatsResponse + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CalculateIssueModelStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse"; + }; + + return CalculateIssueModelStatsResponse; + })(); + + v1.CreatePhraseMatcherRequest = (function() { + + /** + * Properties of a CreatePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface ICreatePhraseMatcherRequest + * @property {string|null} [parent] CreatePhraseMatcherRequest parent + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null} [phraseMatcher] CreatePhraseMatcherRequest phraseMatcher + */ + + /** + * Constructs a new CreatePhraseMatcherRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a CreatePhraseMatcherRequest. + * @implements ICreatePhraseMatcherRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest=} [properties] Properties to set + */ + function CreatePhraseMatcherRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreatePhraseMatcherRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @instance + */ + CreatePhraseMatcherRequest.prototype.parent = ""; + + /** + * CreatePhraseMatcherRequest phraseMatcher. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null|undefined} phraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @instance + */ + CreatePhraseMatcherRequest.prototype.phraseMatcher = null; + + /** + * Creates a new CreatePhraseMatcherRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest instance + */ + CreatePhraseMatcherRequest.create = function create(properties) { + return new CreatePhraseMatcherRequest(properties); + }; + + /** + * Encodes the specified CreatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} message CreatePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePhraseMatcherRequest.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.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatcher, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} message CreatePhraseMatcherRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreatePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePhraseMatcherRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreatePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreatePhraseMatcherRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreatePhraseMatcherRequest.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.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatcher); + if (error) + return "phraseMatcher." + error; + } + return null; + }; + + /** + * Creates a CreatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + */ + CreatePhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.phraseMatcher != null) { + if (typeof object.phraseMatcher !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.phraseMatcher: object expected"); + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatcher); + } + return message; + }; /** - * Creates a CalculateIssueModelStatsRequest message from a plain object. Also converts values to their respective internal types. + * Creates a plain object from a CreatePhraseMatcherRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} message CreatePhraseMatcherRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreatePhraseMatcherRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.phraseMatcher = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + object.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatcher, options); + return object; + }; + + /** + * Converts this CreatePhraseMatcherRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @instance + * @returns {Object.} JSON object + */ + CreatePhraseMatcherRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreatePhraseMatcherRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreatePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest"; + }; + + return CreatePhraseMatcherRequest; + })(); + + v1.ListPhraseMatchersRequest = (function() { + + /** + * Properties of a ListPhraseMatchersRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListPhraseMatchersRequest + * @property {string|null} [parent] ListPhraseMatchersRequest parent + * @property {number|null} [pageSize] ListPhraseMatchersRequest pageSize + * @property {string|null} [pageToken] ListPhraseMatchersRequest pageToken + * @property {string|null} [filter] ListPhraseMatchersRequest filter + */ + + /** + * Constructs a new ListPhraseMatchersRequest. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListPhraseMatchersRequest. + * @implements IListPhraseMatchersRequest + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest=} [properties] Properties to set + */ + function ListPhraseMatchersRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPhraseMatchersRequest parent. + * @member {string} parent + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.parent = ""; + + /** + * ListPhraseMatchersRequest pageSize. + * @member {number} pageSize + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.pageSize = 0; + + /** + * ListPhraseMatchersRequest pageToken. + * @member {string} pageToken + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.pageToken = ""; + + /** + * ListPhraseMatchersRequest filter. + * @member {string} filter + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + */ + ListPhraseMatchersRequest.prototype.filter = ""; + + /** + * Creates a new ListPhraseMatchersRequest instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest instance + */ + ListPhraseMatchersRequest.create = function create(properties) { + return new ListPhraseMatchersRequest(properties); + }; + + /** + * Encodes the specified ListPhraseMatchersRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} message ListPhraseMatchersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); + if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); + if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); + if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + return writer; + }; + + /** + * Encodes the specified ListPhraseMatchersRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} message ListPhraseMatchersRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + case 4: { + message.filter = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPhraseMatchersRequest message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPhraseMatchersRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.parent != null && message.hasOwnProperty("parent")) + if (!$util.isString(message.parent)) + return "parent: string expected"; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + if (!$util.isInteger(message.pageSize)) + return "pageSize: integer expected"; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + if (!$util.isString(message.pageToken)) + return "pageToken: string expected"; + if (message.filter != null && message.hasOwnProperty("filter")) + if (!$util.isString(message.filter)) + return "filter: string expected"; + return null; + }; + + /** + * Creates a ListPhraseMatchersRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + */ + ListPhraseMatchersRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.pageSize != null) + message.pageSize = object.pageSize | 0; + if (object.pageToken != null) + message.pageToken = String(object.pageToken); + if (object.filter != null) + message.filter = String(object.filter); + return message; + }; + + /** + * Creates a plain object from a ListPhraseMatchersRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} message ListPhraseMatchersRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListPhraseMatchersRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.pageSize = 0; + object.pageToken = ""; + object.filter = ""; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.pageSize != null && message.hasOwnProperty("pageSize")) + object.pageSize = message.pageSize; + if (message.pageToken != null && message.hasOwnProperty("pageToken")) + object.pageToken = message.pageToken; + if (message.filter != null && message.hasOwnProperty("filter")) + object.filter = message.filter; + return object; + }; + + /** + * Converts this ListPhraseMatchersRequest to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @instance + * @returns {Object.} JSON object + */ + ListPhraseMatchersRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListPhraseMatchersRequest + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListPhraseMatchersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest"; + }; + + return ListPhraseMatchersRequest; + })(); + + v1.ListPhraseMatchersResponse = (function() { + + /** + * Properties of a ListPhraseMatchersResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IListPhraseMatchersResponse + * @property {Array.|null} [phraseMatchers] ListPhraseMatchersResponse phraseMatchers + * @property {string|null} [nextPageToken] ListPhraseMatchersResponse nextPageToken + */ + + /** + * Constructs a new ListPhraseMatchersResponse. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ListPhraseMatchersResponse. + * @implements IListPhraseMatchersResponse + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse=} [properties] Properties to set + */ + function ListPhraseMatchersResponse(properties) { + this.phraseMatchers = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListPhraseMatchersResponse phraseMatchers. + * @member {Array.} phraseMatchers + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @instance + */ + ListPhraseMatchersResponse.prototype.phraseMatchers = $util.emptyArray; + + /** + * ListPhraseMatchersResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @instance + */ + ListPhraseMatchersResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListPhraseMatchersResponse instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse instance + */ + ListPhraseMatchersResponse.create = function create(properties) { + return new ListPhraseMatchersResponse(properties); + }; + + /** + * Encodes the specified ListPhraseMatchersResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse} message ListPhraseMatchersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.phraseMatchers != null && message.phraseMatchers.length) + for (var i = 0; i < message.phraseMatchers.length; ++i) + $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatchers[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 ListPhraseMatchersResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse} message ListPhraseMatchersResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListPhraseMatchersResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.phraseMatchers && message.phraseMatchers.length)) + message.phraseMatchers = []; + message.phraseMatchers.push($root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListPhraseMatchersResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListPhraseMatchersResponse message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListPhraseMatchersResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { + if (!Array.isArray(message.phraseMatchers)) + return "phraseMatchers: array expected"; + for (var i = 0; i < message.phraseMatchers.length; ++i) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatchers[i]); + if (error) + return "phraseMatchers." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListPhraseMatchersResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} CalculateIssueModelStatsRequest + * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse */ - CalculateIssueModelStatsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest) + ListPhraseMatchersResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest(); - if (object.issueModel != null) - message.issueModel = String(object.issueModel); + var message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse(); + if (object.phraseMatchers) { + if (!Array.isArray(object.phraseMatchers)) + throw TypeError(".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.phraseMatchers: array expected"); + message.phraseMatchers = []; + for (var i = 0; i < object.phraseMatchers.length; ++i) { + if (typeof object.phraseMatchers[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.phraseMatchers: object expected"); + message.phraseMatchers[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatchers[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); return message; }; /** - * Creates a plain object from a CalculateIssueModelStatsRequest message. Also converts values to other types if specified. + * Creates a plain object from a ListPhraseMatchersResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse * @static - * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest} message CalculateIssueModelStatsRequest + * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} message ListPhraseMatchersResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CalculateIssueModelStatsRequest.toObject = function toObject(message, options) { + ListPhraseMatchersResponse.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.phraseMatchers = []; if (options.defaults) - object.issueModel = ""; - if (message.issueModel != null && message.hasOwnProperty("issueModel")) - object.issueModel = message.issueModel; + object.nextPageToken = ""; + if (message.phraseMatchers && message.phraseMatchers.length) { + object.phraseMatchers = []; + for (var j = 0; j < message.phraseMatchers.length; ++j) + object.phraseMatchers[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatchers[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; return object; }; /** - * Converts this CalculateIssueModelStatsRequest to JSON. + * Converts this ListPhraseMatchersResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse * @instance * @returns {Object.} JSON object */ - CalculateIssueModelStatsRequest.prototype.toJSON = function toJSON() { + ListPhraseMatchersResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CalculateIssueModelStatsRequest + * Gets the default type url for ListPhraseMatchersResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest + * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CalculateIssueModelStatsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ListPhraseMatchersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse"; }; - return CalculateIssueModelStatsRequest; + return ListPhraseMatchersResponse; })(); - v1.CalculateIssueModelStatsResponse = (function() { + v1.GetPhraseMatcherRequest = (function() { /** - * Properties of a CalculateIssueModelStatsResponse. + * Properties of a GetPhraseMatcherRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICalculateIssueModelStatsResponse - * @property {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null} [currentStats] CalculateIssueModelStatsResponse currentStats + * @interface IGetPhraseMatcherRequest + * @property {string|null} [name] GetPhraseMatcherRequest name */ /** - * Constructs a new CalculateIssueModelStatsResponse. + * Constructs a new GetPhraseMatcherRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CalculateIssueModelStatsResponse. - * @implements ICalculateIssueModelStatsResponse + * @classdesc Represents a GetPhraseMatcherRequest. + * @implements IGetPhraseMatcherRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest=} [properties] Properties to set */ - function CalculateIssueModelStatsResponse(properties) { + function GetPhraseMatcherRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15313,75 +18361,75 @@ } /** - * CalculateIssueModelStatsResponse currentStats. - * @member {google.cloud.contactcenterinsights.v1.IIssueModelLabelStats|null|undefined} currentStats - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * GetPhraseMatcherRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @instance */ - CalculateIssueModelStatsResponse.prototype.currentStats = null; + GetPhraseMatcherRequest.prototype.name = ""; /** - * Creates a new CalculateIssueModelStatsResponse instance using the specified properties. + * Creates a new GetPhraseMatcherRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse instance + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest instance */ - CalculateIssueModelStatsResponse.create = function create(properties) { - return new CalculateIssueModelStatsResponse(properties); + GetPhraseMatcherRequest.create = function create(properties) { + return new GetPhraseMatcherRequest(properties); }; /** - * Encodes the specified CalculateIssueModelStatsResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * Encodes the specified GetPhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} message GetPhraseMatcherRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateIssueModelStatsResponse.encode = function encode(message, writer) { + GetPhraseMatcherRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.currentStats != null && Object.hasOwnProperty.call(message, "currentStats")) - $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.encode(message.currentStats, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CalculateIssueModelStatsResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.verify|verify} messages. + * Encodes the specified GetPhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} message GetPhraseMatcherRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CalculateIssueModelStatsResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetPhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer. + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateIssueModelStatsResponse.decode = function decode(reader, length) { + GetPhraseMatcherRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 4: { - message.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.decode(reader, reader.uint32()); + case 1: { + message.name = reader.string(); break; } default: @@ -15393,128 +18441,122 @@ }; /** - * Decodes a CalculateIssueModelStatsResponse message from the specified reader or buffer, length delimited. + * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CalculateIssueModelStatsResponse.decodeDelimited = function decodeDelimited(reader) { + GetPhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CalculateIssueModelStatsResponse message. + * Verifies a GetPhraseMatcherRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CalculateIssueModelStatsResponse.verify = function verify(message) { + GetPhraseMatcherRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.currentStats != null && message.hasOwnProperty("currentStats")) { - var error = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.verify(message.currentStats); - if (error) - return "currentStats." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CalculateIssueModelStatsResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetPhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} CalculateIssueModelStatsResponse + * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest */ - CalculateIssueModelStatsResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse) + GetPhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse(); - if (object.currentStats != null) { - if (typeof object.currentStats !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse.currentStats: object expected"); - message.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.fromObject(object.currentStats); - } + var message = new $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CalculateIssueModelStatsResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetPhraseMatcherRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse} message CalculateIssueModelStatsResponse + * @param {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} message GetPhraseMatcherRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CalculateIssueModelStatsResponse.toObject = function toObject(message, options) { + GetPhraseMatcherRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) - object.currentStats = null; - if (message.currentStats != null && message.hasOwnProperty("currentStats")) - object.currentStats = $root.google.cloud.contactcenterinsights.v1.IssueModelLabelStats.toObject(message.currentStats, options); + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CalculateIssueModelStatsResponse to JSON. + * Converts this GetPhraseMatcherRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @instance * @returns {Object.} JSON object */ - CalculateIssueModelStatsResponse.prototype.toJSON = function toJSON() { + GetPhraseMatcherRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CalculateIssueModelStatsResponse + * Gets the default type url for GetPhraseMatcherRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse + * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CalculateIssueModelStatsResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetPhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CalculateIssueModelStatsResponse"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest"; }; - return CalculateIssueModelStatsResponse; + return GetPhraseMatcherRequest; })(); - v1.CreatePhraseMatcherRequest = (function() { + v1.DeletePhraseMatcherRequest = (function() { /** - * Properties of a CreatePhraseMatcherRequest. + * Properties of a DeletePhraseMatcherRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface ICreatePhraseMatcherRequest - * @property {string|null} [parent] CreatePhraseMatcherRequest parent - * @property {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null} [phraseMatcher] CreatePhraseMatcherRequest phraseMatcher + * @interface IDeletePhraseMatcherRequest + * @property {string|null} [name] DeletePhraseMatcherRequest name */ /** - * Constructs a new CreatePhraseMatcherRequest. + * Constructs a new DeletePhraseMatcherRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a CreatePhraseMatcherRequest. - * @implements ICreatePhraseMatcherRequest + * @classdesc Represents a DeletePhraseMatcherRequest. + * @implements IDeletePhraseMatcherRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest=} [properties] Properties to set */ - function CreatePhraseMatcherRequest(properties) { + function DeletePhraseMatcherRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15522,89 +18564,75 @@ } /** - * CreatePhraseMatcherRequest parent. - * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest - * @instance - */ - CreatePhraseMatcherRequest.prototype.parent = ""; - - /** - * CreatePhraseMatcherRequest phraseMatcher. - * @member {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null|undefined} phraseMatcher - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * DeletePhraseMatcherRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @instance */ - CreatePhraseMatcherRequest.prototype.phraseMatcher = null; + DeletePhraseMatcherRequest.prototype.name = ""; /** - * Creates a new CreatePhraseMatcherRequest instance using the specified properties. + * Creates a new DeletePhraseMatcherRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest instance + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest instance */ - CreatePhraseMatcherRequest.create = function create(properties) { - return new CreatePhraseMatcherRequest(properties); + DeletePhraseMatcherRequest.create = function create(properties) { + return new DeletePhraseMatcherRequest(properties); }; /** - * Encodes the specified CreatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * Encodes the specified DeletePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} message CreatePhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} message DeletePhraseMatcherRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseMatcherRequest.encode = function encode(message, writer) { + DeletePhraseMatcherRequest.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.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) - $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatcher, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified CreatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.verify|verify} messages. + * Encodes the specified DeletePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ICreatePhraseMatcherRequest} message CreatePhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} message DeletePhraseMatcherRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - CreatePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + DeletePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer. + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePhraseMatcherRequest.decode = function decode(reader, length) { + DeletePhraseMatcherRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); - break; - } - case 2: { - message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32()); + message.name = reader.string(); break; } default: @@ -15616,139 +18644,123 @@ }; /** - * Decodes a CreatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - CreatePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + DeletePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a CreatePhraseMatcherRequest message. + * Verifies a DeletePhraseMatcherRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - CreatePhraseMatcherRequest.verify = function verify(message) { + DeletePhraseMatcherRequest.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.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatcher); - if (error) - return "phraseMatcher." + error; - } + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a CreatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates a DeletePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} CreatePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest */ - CreatePhraseMatcherRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest) + DeletePhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.phraseMatcher != null) { - if (typeof object.phraseMatcher !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest.phraseMatcher: object expected"); - message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatcher); - } + var message = new $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a CreatePhraseMatcherRequest message. Also converts values to other types if specified. + * Creates a plain object from a DeletePhraseMatcherRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest} message CreatePhraseMatcherRequest + * @param {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} message DeletePhraseMatcherRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - CreatePhraseMatcherRequest.toObject = function toObject(message, options) { + DeletePhraseMatcherRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.parent = ""; - object.phraseMatcher = null; - } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) - object.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatcher, options); + if (options.defaults) + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this CreatePhraseMatcherRequest to JSON. + * Converts this DeletePhraseMatcherRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @instance * @returns {Object.} JSON object */ - CreatePhraseMatcherRequest.prototype.toJSON = function toJSON() { + DeletePhraseMatcherRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for CreatePhraseMatcherRequest + * Gets the default type url for DeletePhraseMatcherRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - CreatePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + DeletePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.CreatePhraseMatcherRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest"; }; - return CreatePhraseMatcherRequest; + return DeletePhraseMatcherRequest; })(); - v1.ListPhraseMatchersRequest = (function() { + v1.UpdatePhraseMatcherRequest = (function() { /** - * Properties of a ListPhraseMatchersRequest. + * Properties of an UpdatePhraseMatcherRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListPhraseMatchersRequest - * @property {string|null} [parent] ListPhraseMatchersRequest parent - * @property {number|null} [pageSize] ListPhraseMatchersRequest pageSize - * @property {string|null} [pageToken] ListPhraseMatchersRequest pageToken - * @property {string|null} [filter] ListPhraseMatchersRequest filter + * @interface IUpdatePhraseMatcherRequest + * @property {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null} [phraseMatcher] UpdatePhraseMatcherRequest phraseMatcher + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePhraseMatcherRequest updateMask */ /** - * Constructs a new ListPhraseMatchersRequest. + * Constructs a new UpdatePhraseMatcherRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListPhraseMatchersRequest. - * @implements IListPhraseMatchersRequest + * @classdesc Represents an UpdatePhraseMatcherRequest. + * @implements IUpdatePhraseMatcherRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest=} [properties] Properties to set */ - function ListPhraseMatchersRequest(properties) { + function UpdatePhraseMatcherRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -15756,117 +18768,89 @@ } /** - * ListPhraseMatchersRequest parent. - * @member {string} parent - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest - * @instance - */ - ListPhraseMatchersRequest.prototype.parent = ""; - - /** - * ListPhraseMatchersRequest pageSize. - * @member {number} pageSize - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest - * @instance - */ - ListPhraseMatchersRequest.prototype.pageSize = 0; - - /** - * ListPhraseMatchersRequest pageToken. - * @member {string} pageToken - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * UpdatePhraseMatcherRequest phraseMatcher. + * @member {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null|undefined} phraseMatcher + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @instance */ - ListPhraseMatchersRequest.prototype.pageToken = ""; + UpdatePhraseMatcherRequest.prototype.phraseMatcher = null; /** - * ListPhraseMatchersRequest filter. - * @member {string} filter - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * UpdatePhraseMatcherRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @instance */ - ListPhraseMatchersRequest.prototype.filter = ""; + UpdatePhraseMatcherRequest.prototype.updateMask = null; /** - * Creates a new ListPhraseMatchersRequest instance using the specified properties. + * Creates a new UpdatePhraseMatcherRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest instance + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest instance */ - ListPhraseMatchersRequest.create = function create(properties) { - return new ListPhraseMatchersRequest(properties); + UpdatePhraseMatcherRequest.create = function create(properties) { + return new UpdatePhraseMatcherRequest(properties); }; /** - * Encodes the specified ListPhraseMatchersRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * Encodes the specified UpdatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} message ListPhraseMatchersRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseMatchersRequest.encode = function encode(message, writer) { + UpdatePhraseMatcherRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.parent != null && Object.hasOwnProperty.call(message, "parent")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.parent); - if (message.pageSize != null && Object.hasOwnProperty.call(message, "pageSize")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.pageSize); - if (message.pageToken != null && Object.hasOwnProperty.call(message, "pageToken")) - writer.uint32(/* id 3, wireType 2 =*/26).string(message.pageToken); - if (message.filter != null && Object.hasOwnProperty.call(message, "filter")) - writer.uint32(/* id 4, wireType 2 =*/34).string(message.filter); + if (message.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) + $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatcher, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified ListPhraseMatchersRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest.verify|verify} messages. + * Encodes the specified UpdatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersRequest} message ListPhraseMatchersRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseMatchersRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdatePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer. + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPhraseMatchersRequest.decode = function decode(reader, length) { + UpdatePhraseMatcherRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.parent = reader.string(); + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32()); break; } case 2: { - message.pageSize = reader.int32(); - break; - } - case 3: { - message.pageToken = reader.string(); - break; - } - case 4: { - message.filter = reader.string(); + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -15878,149 +18862,141 @@ }; /** - * Decodes a ListPhraseMatchersRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPhraseMatchersRequest.decodeDelimited = function decodeDelimited(reader) { + UpdatePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPhraseMatchersRequest message. + * Verifies an UpdatePhraseMatcherRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPhraseMatchersRequest.verify = function verify(message) { + UpdatePhraseMatcherRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.parent != null && message.hasOwnProperty("parent")) - if (!$util.isString(message.parent)) - return "parent: string expected"; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - if (!$util.isInteger(message.pageSize)) - return "pageSize: integer expected"; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - if (!$util.isString(message.pageToken)) - return "pageToken: string expected"; - if (message.filter != null && message.hasOwnProperty("filter")) - if (!$util.isString(message.filter)) - return "filter: string expected"; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) { + var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatcher); + if (error) + return "phraseMatcher." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a ListPhraseMatchersRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} ListPhraseMatchersRequest + * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest */ - ListPhraseMatchersRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest) + UpdatePhraseMatcherRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest(); - if (object.parent != null) - message.parent = String(object.parent); - if (object.pageSize != null) - message.pageSize = object.pageSize | 0; - if (object.pageToken != null) - message.pageToken = String(object.pageToken); - if (object.filter != null) - message.filter = String(object.filter); + var message = new $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest(); + if (object.phraseMatcher != null) { + if (typeof object.phraseMatcher !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.phraseMatcher: object expected"); + message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatcher); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a ListPhraseMatchersRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdatePhraseMatcherRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest} message ListPhraseMatchersRequest + * @param {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseMatchersRequest.toObject = function toObject(message, options) { + UpdatePhraseMatcherRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; if (options.defaults) { - object.parent = ""; - object.pageSize = 0; - object.pageToken = ""; - object.filter = ""; + object.phraseMatcher = null; + object.updateMask = null; } - if (message.parent != null && message.hasOwnProperty("parent")) - object.parent = message.parent; - if (message.pageSize != null && message.hasOwnProperty("pageSize")) - object.pageSize = message.pageSize; - if (message.pageToken != null && message.hasOwnProperty("pageToken")) - object.pageToken = message.pageToken; - if (message.filter != null && message.hasOwnProperty("filter")) - object.filter = message.filter; + if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) + object.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatcher, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this ListPhraseMatchersRequest to JSON. + * Converts this UpdatePhraseMatcherRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @instance * @returns {Object.} JSON object */ - ListPhraseMatchersRequest.prototype.toJSON = function toJSON() { + UpdatePhraseMatcherRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPhraseMatchersRequest + * Gets the default type url for UpdatePhraseMatcherRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPhraseMatchersRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdatePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListPhraseMatchersRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest"; }; - return ListPhraseMatchersRequest; + return UpdatePhraseMatcherRequest; })(); - v1.ListPhraseMatchersResponse = (function() { + v1.GetSettingsRequest = (function() { /** - * Properties of a ListPhraseMatchersResponse. + * Properties of a GetSettingsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IListPhraseMatchersResponse - * @property {Array.|null} [phraseMatchers] ListPhraseMatchersResponse phraseMatchers - * @property {string|null} [nextPageToken] ListPhraseMatchersResponse nextPageToken + * @interface IGetSettingsRequest + * @property {string|null} [name] GetSettingsRequest name */ /** - * Constructs a new ListPhraseMatchersResponse. + * Constructs a new GetSettingsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a ListPhraseMatchersResponse. - * @implements IListPhraseMatchersResponse + * @classdesc Represents a GetSettingsRequest. + * @implements IGetSettingsRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest=} [properties] Properties to set */ - function ListPhraseMatchersResponse(properties) { - this.phraseMatchers = []; + function GetSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16028,92 +19004,75 @@ } /** - * ListPhraseMatchersResponse phraseMatchers. - * @member {Array.} phraseMatchers - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse - * @instance - */ - ListPhraseMatchersResponse.prototype.phraseMatchers = $util.emptyArray; - - /** - * ListPhraseMatchersResponse nextPageToken. - * @member {string} nextPageToken - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * GetSettingsRequest name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @instance */ - ListPhraseMatchersResponse.prototype.nextPageToken = ""; + GetSettingsRequest.prototype.name = ""; /** - * Creates a new ListPhraseMatchersResponse instance using the specified properties. + * Creates a new GetSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse instance + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest instance */ - ListPhraseMatchersResponse.create = function create(properties) { - return new ListPhraseMatchersResponse(properties); + GetSettingsRequest.create = function create(properties) { + return new GetSettingsRequest(properties); }; /** - * Encodes the specified ListPhraseMatchersResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse} message ListPhraseMatchersResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseMatchersResponse.encode = function encode(message, writer) { + GetSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.phraseMatchers != null && message.phraseMatchers.length) - for (var i = 0; i < message.phraseMatchers.length; ++i) - $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatchers[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.nextPageToken != null && Object.hasOwnProperty.call(message, "nextPageToken")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.nextPageToken); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); return writer; }; /** - * Encodes the specified ListPhraseMatchersResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.verify|verify} messages. + * Encodes the specified GetSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IListPhraseMatchersResponse} message ListPhraseMatchersResponse message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ListPhraseMatchersResponse.encodeDelimited = function encodeDelimited(message, writer) { + GetSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer. + * Decodes a GetSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPhraseMatchersResponse.decode = function decode(reader, length) { + GetSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.phraseMatchers && message.phraseMatchers.length)) - message.phraseMatchers = []; - message.phraseMatchers.push($root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32())); - break; - } - case 2: { - message.nextPageToken = reader.string(); + message.name = reader.string(); break; } default: @@ -16125,148 +19084,123 @@ }; /** - * Decodes a ListPhraseMatchersResponse message from the specified reader or buffer, length delimited. + * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ListPhraseMatchersResponse.decodeDelimited = function decodeDelimited(reader) { + GetSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ListPhraseMatchersResponse message. + * Verifies a GetSettingsRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ListPhraseMatchersResponse.verify = function verify(message) { + GetSettingsRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.phraseMatchers != null && message.hasOwnProperty("phraseMatchers")) { - if (!Array.isArray(message.phraseMatchers)) - return "phraseMatchers: array expected"; - for (var i = 0; i < message.phraseMatchers.length; ++i) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatchers[i]); - if (error) - return "phraseMatchers." + error; - } - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - if (!$util.isString(message.nextPageToken)) - return "nextPageToken: string expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; return null; }; /** - * Creates a ListPhraseMatchersResponse message from a plain object. Also converts values to their respective internal types. + * Creates a GetSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} ListPhraseMatchersResponse + * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest */ - ListPhraseMatchersResponse.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse) + GetSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse(); - if (object.phraseMatchers) { - if (!Array.isArray(object.phraseMatchers)) - throw TypeError(".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.phraseMatchers: array expected"); - message.phraseMatchers = []; - for (var i = 0; i < object.phraseMatchers.length; ++i) { - if (typeof object.phraseMatchers[i] !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse.phraseMatchers: object expected"); - message.phraseMatchers[i] = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatchers[i]); - } - } - if (object.nextPageToken != null) - message.nextPageToken = String(object.nextPageToken); + var message = new $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest(); + if (object.name != null) + message.name = String(object.name); return message; }; /** - * Creates a plain object from a ListPhraseMatchersResponse message. Also converts values to other types if specified. + * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse} message ListPhraseMatchersResponse + * @param {google.cloud.contactcenterinsights.v1.GetSettingsRequest} message GetSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ListPhraseMatchersResponse.toObject = function toObject(message, options) { + GetSettingsRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.phraseMatchers = []; if (options.defaults) - object.nextPageToken = ""; - if (message.phraseMatchers && message.phraseMatchers.length) { - object.phraseMatchers = []; - for (var j = 0; j < message.phraseMatchers.length; ++j) - object.phraseMatchers[j] = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatchers[j], options); - } - if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) - object.nextPageToken = message.nextPageToken; + object.name = ""; + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; return object; }; /** - * Converts this ListPhraseMatchersResponse to JSON. + * Converts this GetSettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @instance * @returns {Object.} JSON object */ - ListPhraseMatchersResponse.prototype.toJSON = function toJSON() { + GetSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ListPhraseMatchersResponse + * Gets the default type url for GetSettingsRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse + * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ListPhraseMatchersResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ListPhraseMatchersResponse"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetSettingsRequest"; }; - return ListPhraseMatchersResponse; + return GetSettingsRequest; })(); - v1.GetPhraseMatcherRequest = (function() { + v1.UpdateSettingsRequest = (function() { /** - * Properties of a GetPhraseMatcherRequest. + * Properties of an UpdateSettingsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGetPhraseMatcherRequest - * @property {string|null} [name] GetPhraseMatcherRequest name + * @interface IUpdateSettingsRequest + * @property {google.cloud.contactcenterinsights.v1.ISettings|null} [settings] UpdateSettingsRequest settings + * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSettingsRequest updateMask */ /** - * Constructs a new GetPhraseMatcherRequest. + * Constructs a new UpdateSettingsRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GetPhraseMatcherRequest. - * @implements IGetPhraseMatcherRequest + * @classdesc Represents an UpdateSettingsRequest. + * @implements IUpdateSettingsRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest=} [properties] Properties to set */ - function GetPhraseMatcherRequest(properties) { + function UpdateSettingsRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16274,75 +19208,89 @@ } /** - * GetPhraseMatcherRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * UpdateSettingsRequest settings. + * @member {google.cloud.contactcenterinsights.v1.ISettings|null|undefined} settings + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @instance */ - GetPhraseMatcherRequest.prototype.name = ""; + UpdateSettingsRequest.prototype.settings = null; /** - * Creates a new GetPhraseMatcherRequest instance using the specified properties. + * UpdateSettingsRequest updateMask. + * @member {google.protobuf.IFieldMask|null|undefined} updateMask + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @instance + */ + UpdateSettingsRequest.prototype.updateMask = null; + + /** + * Creates a new UpdateSettingsRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest instance + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest instance */ - GetPhraseMatcherRequest.create = function create(properties) { - return new GetPhraseMatcherRequest(properties); + UpdateSettingsRequest.create = function create(properties) { + return new UpdateSettingsRequest(properties); }; /** - * Encodes the specified GetPhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} message GetPhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseMatcherRequest.encode = function encode(message, writer) { + UpdateSettingsRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.name != null && Object.hasOwnProperty.call(message, "name")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) + $root.google.cloud.contactcenterinsights.v1.Settings.encode(message.settings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) + $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified GetPhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest.verify|verify} messages. + * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IGetPhraseMatcherRequest} message GetPhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetPhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + UpdateSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer. + * Decodes an UpdateSettingsRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPhraseMatcherRequest.decode = function decode(reader, length) { + UpdateSettingsRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.name = reader.string(); + message.settings = $root.google.cloud.contactcenterinsights.v1.Settings.decode(reader, reader.uint32()); + break; + } + case 2: { + message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); break; } default: @@ -16354,122 +19302,141 @@ }; /** - * Decodes a GetPhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetPhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + UpdateSettingsRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetPhraseMatcherRequest message. + * Verifies an UpdateSettingsRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetPhraseMatcherRequest.verify = function verify(message) { + UpdateSettingsRequest.verify = function verify(message) { if (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.settings != null && message.hasOwnProperty("settings")) { + var error = $root.google.cloud.contactcenterinsights.v1.Settings.verify(message.settings); + if (error) + return "settings." + error; + } + if (message.updateMask != null && message.hasOwnProperty("updateMask")) { + var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (error) + return "updateMask." + error; + } return null; }; /** - * Creates a GetPhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} GetPhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest */ - GetPhraseMatcherRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest) + UpdateSettingsRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest(); - if (object.name != null) - message.name = String(object.name); + var message = new $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest(); + if (object.settings != null) { + if (typeof object.settings !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.settings: object expected"); + message.settings = $root.google.cloud.contactcenterinsights.v1.Settings.fromObject(object.settings); + } + if (object.updateMask != null) { + if (typeof object.updateMask !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.updateMask: object expected"); + message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + } return message; }; /** - * Creates a plain object from a GetPhraseMatcherRequest message. Also converts values to other types if specified. + * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static - * @param {google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest} message GetPhraseMatcherRequest + * @param {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} message UpdateSettingsRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetPhraseMatcherRequest.toObject = function toObject(message, options) { + UpdateSettingsRequest.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.settings = null; + object.updateMask = null; + } + if (message.settings != null && message.hasOwnProperty("settings")) + object.settings = $root.google.cloud.contactcenterinsights.v1.Settings.toObject(message.settings, options); + if (message.updateMask != null && message.hasOwnProperty("updateMask")) + object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this GetPhraseMatcherRequest to JSON. + * Converts this UpdateSettingsRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @instance * @returns {Object.} JSON object */ - GetPhraseMatcherRequest.prototype.toJSON = function toJSON() { + UpdateSettingsRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetPhraseMatcherRequest + * Gets the default type url for UpdateSettingsRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetPhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UpdateSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetPhraseMatcherRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateSettingsRequest"; }; - return GetPhraseMatcherRequest; + return UpdateSettingsRequest; })(); - v1.DeletePhraseMatcherRequest = (function() { + v1.GetEncryptionSpecRequest = (function() { /** - * Properties of a DeletePhraseMatcherRequest. + * Properties of a GetEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IDeletePhraseMatcherRequest - * @property {string|null} [name] DeletePhraseMatcherRequest name + * @interface IGetEncryptionSpecRequest + * @property {string|null} [name] GetEncryptionSpecRequest name */ /** - * Constructs a new DeletePhraseMatcherRequest. + * Constructs a new GetEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a DeletePhraseMatcherRequest. - * @implements IDeletePhraseMatcherRequest + * @classdesc Represents a GetEncryptionSpecRequest. + * @implements IGetEncryptionSpecRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest=} [properties] Properties to set */ - function DeletePhraseMatcherRequest(properties) { + function GetEncryptionSpecRequest(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16477,35 +19444,35 @@ } /** - * DeletePhraseMatcherRequest name. + * GetEncryptionSpecRequest name. * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @instance */ - DeletePhraseMatcherRequest.prototype.name = ""; + GetEncryptionSpecRequest.prototype.name = ""; /** - * Creates a new DeletePhraseMatcherRequest instance using the specified properties. + * Creates a new GetEncryptionSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest instance + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest instance */ - DeletePhraseMatcherRequest.create = function create(properties) { - return new DeletePhraseMatcherRequest(properties); + GetEncryptionSpecRequest.create = function create(properties) { + return new GetEncryptionSpecRequest(properties); }; /** - * Encodes the specified DeletePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * Encodes the specified GetEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} message DeletePhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} message GetEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseMatcherRequest.encode = function encode(message, writer) { + GetEncryptionSpecRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); if (message.name != null && Object.hasOwnProperty.call(message, "name")) @@ -16514,33 +19481,33 @@ }; /** - * Encodes the specified DeletePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest.verify|verify} messages. + * Encodes the specified GetEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IDeletePhraseMatcherRequest} message DeletePhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest} message GetEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - DeletePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + GetEncryptionSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePhraseMatcherRequest.decode = function decode(reader, length) { + GetEncryptionSpecRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { @@ -16557,30 +19524,30 @@ }; /** - * Decodes a DeletePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes a GetEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - DeletePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + GetEncryptionSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a DeletePhraseMatcherRequest message. + * Verifies a GetEncryptionSpecRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - DeletePhraseMatcherRequest.verify = function verify(message) { + GetEncryptionSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; if (message.name != null && message.hasOwnProperty("name")) @@ -16590,32 +19557,32 @@ }; /** - * Creates a DeletePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates a GetEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} DeletePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} GetEncryptionSpecRequest */ - DeletePhraseMatcherRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest) + GetEncryptionSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest(); + var message = new $root.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest(); if (object.name != null) message.name = String(object.name); return message; }; /** - * Creates a plain object from a DeletePhraseMatcherRequest message. Also converts values to other types if specified. + * Creates a plain object from a GetEncryptionSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest} message DeletePhraseMatcherRequest + * @param {google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest} message GetEncryptionSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - DeletePhraseMatcherRequest.toObject = function toObject(message, options) { + GetEncryptionSpecRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; @@ -16627,143 +19594,128 @@ }; /** - * Converts this DeletePhraseMatcherRequest to JSON. + * Converts this GetEncryptionSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @instance * @returns {Object.} JSON object */ - DeletePhraseMatcherRequest.prototype.toJSON = function toJSON() { + GetEncryptionSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for DeletePhraseMatcherRequest + * Gets the default type url for GetEncryptionSpecRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - DeletePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + GetEncryptionSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.DeletePhraseMatcherRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest"; }; - return DeletePhraseMatcherRequest; + return GetEncryptionSpecRequest; })(); - v1.UpdatePhraseMatcherRequest = (function() { + v1.InitializeEncryptionSpecRequest = (function() { /** - * Properties of an UpdatePhraseMatcherRequest. + * Properties of an InitializeEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IUpdatePhraseMatcherRequest - * @property {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null} [phraseMatcher] UpdatePhraseMatcherRequest phraseMatcher - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdatePhraseMatcherRequest updateMask + * @interface IInitializeEncryptionSpecRequest + * @property {google.cloud.contactcenterinsights.v1.IEncryptionSpec|null} [encryptionSpec] InitializeEncryptionSpecRequest encryptionSpec */ /** - * Constructs a new UpdatePhraseMatcherRequest. + * Constructs a new InitializeEncryptionSpecRequest. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an UpdatePhraseMatcherRequest. - * @implements IUpdatePhraseMatcherRequest + * @classdesc Represents an InitializeEncryptionSpecRequest. + * @implements IInitializeEncryptionSpecRequest * @constructor - * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest=} [properties] Properties to set */ - function UpdatePhraseMatcherRequest(properties) { + function InitializeEncryptionSpecRequest(properties) { if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } - - /** - * UpdatePhraseMatcherRequest phraseMatcher. - * @member {google.cloud.contactcenterinsights.v1.IPhraseMatcher|null|undefined} phraseMatcher - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest - * @instance - */ - UpdatePhraseMatcherRequest.prototype.phraseMatcher = null; + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } /** - * UpdatePhraseMatcherRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * InitializeEncryptionSpecRequest encryptionSpec. + * @member {google.cloud.contactcenterinsights.v1.IEncryptionSpec|null|undefined} encryptionSpec + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @instance */ - UpdatePhraseMatcherRequest.prototype.updateMask = null; + InitializeEncryptionSpecRequest.prototype.encryptionSpec = null; /** - * Creates a new UpdatePhraseMatcherRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecRequest instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest instance */ - UpdatePhraseMatcherRequest.create = function create(properties) { - return new UpdatePhraseMatcherRequest(properties); + InitializeEncryptionSpecRequest.create = function create(properties) { + return new InitializeEncryptionSpecRequest(properties); }; /** - * Encodes the specified UpdatePhraseMatcherRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseMatcherRequest.encode = function encode(message, writer) { + InitializeEncryptionSpecRequest.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.phraseMatcher != null && Object.hasOwnProperty.call(message, "phraseMatcher")) - $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.encode(message.phraseMatcher, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.encryptionSpec != null && Object.hasOwnProperty.call(message, "encryptionSpec")) + $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.encode(message.encryptionSpec, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdatePhraseMatcherRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdatePhraseMatcherRequest.encodeDelimited = function encodeDelimited(message, writer) { + InitializeEncryptionSpecRequest.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePhraseMatcherRequest.decode = function decode(reader, length) { + InitializeEncryptionSpecRequest.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.decode(reader, reader.uint32()); - break; - } - case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.decode(reader, reader.uint32()); break; } default: @@ -16775,141 +19727,126 @@ }; /** - * Decodes an UpdatePhraseMatcherRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecRequest message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdatePhraseMatcherRequest.decodeDelimited = function decodeDelimited(reader) { + InitializeEncryptionSpecRequest.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdatePhraseMatcherRequest message. + * Verifies an InitializeEncryptionSpecRequest message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdatePhraseMatcherRequest.verify = function verify(message) { + InitializeEncryptionSpecRequest.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) { - var error = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.verify(message.phraseMatcher); - if (error) - return "phraseMatcher." + error; - } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) { + var error = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.verify(message.encryptionSpec); if (error) - return "updateMask." + error; + return "encryptionSpec." + error; } return null; }; /** - * Creates an UpdatePhraseMatcherRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecRequest message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} UpdatePhraseMatcherRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} InitializeEncryptionSpecRequest */ - UpdatePhraseMatcherRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest) + InitializeEncryptionSpecRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest(); - if (object.phraseMatcher != null) { - if (typeof object.phraseMatcher !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.phraseMatcher: object expected"); - message.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.fromObject(object.phraseMatcher); - } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + var message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest(); + if (object.encryptionSpec != null) { + if (typeof object.encryptionSpec !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.encryptionSpec: object expected"); + message.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.fromObject(object.encryptionSpec); } return message; }; /** - * Creates a plain object from an UpdatePhraseMatcherRequest message. Also converts values to other types if specified. + * Creates a plain object from an InitializeEncryptionSpecRequest message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static - * @param {google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest} message UpdatePhraseMatcherRequest + * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest} message InitializeEncryptionSpecRequest * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdatePhraseMatcherRequest.toObject = function toObject(message, options) { + InitializeEncryptionSpecRequest.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.phraseMatcher = null; - object.updateMask = null; - } - if (message.phraseMatcher != null && message.hasOwnProperty("phraseMatcher")) - object.phraseMatcher = $root.google.cloud.contactcenterinsights.v1.PhraseMatcher.toObject(message.phraseMatcher, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); + if (options.defaults) + object.encryptionSpec = null; + if (message.encryptionSpec != null && message.hasOwnProperty("encryptionSpec")) + object.encryptionSpec = $root.google.cloud.contactcenterinsights.v1.EncryptionSpec.toObject(message.encryptionSpec, options); return object; }; /** - * Converts this UpdatePhraseMatcherRequest to JSON. + * Converts this InitializeEncryptionSpecRequest to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @instance * @returns {Object.} JSON object */ - UpdatePhraseMatcherRequest.prototype.toJSON = function toJSON() { + InitializeEncryptionSpecRequest.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdatePhraseMatcherRequest + * Gets the default type url for InitializeEncryptionSpecRequest * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdatePhraseMatcherRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitializeEncryptionSpecRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdatePhraseMatcherRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest"; }; - return UpdatePhraseMatcherRequest; + return InitializeEncryptionSpecRequest; })(); - v1.GetSettingsRequest = (function() { + v1.InitializeEncryptionSpecResponse = (function() { /** - * Properties of a GetSettingsRequest. + * Properties of an InitializeEncryptionSpecResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IGetSettingsRequest - * @property {string|null} [name] GetSettingsRequest name + * @interface IInitializeEncryptionSpecResponse */ /** - * Constructs a new GetSettingsRequest. + * Constructs a new InitializeEncryptionSpecResponse. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents a GetSettingsRequest. - * @implements IGetSettingsRequest + * @classdesc Represents an InitializeEncryptionSpecResponse. + * @implements IInitializeEncryptionSpecResponse * @constructor - * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse=} [properties] Properties to set */ - function GetSettingsRequest(properties) { + function InitializeEncryptionSpecResponse(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -16917,77 +19854,63 @@ } /** - * GetSettingsRequest name. - * @member {string} name - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest - * @instance - */ - GetSettingsRequest.prototype.name = ""; - - /** - * Creates a new GetSettingsRequest instance using the specified properties. + * Creates a new InitializeEncryptionSpecResponse instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse instance */ - GetSettingsRequest.create = function create(properties) { - return new GetSettingsRequest(properties); + InitializeEncryptionSpecResponse.create = function create(properties) { + return new InitializeEncryptionSpecResponse(properties); }; /** - * Encodes the specified GetSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecResponse message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSettingsRequest.encode = function encode(message, writer) { + InitializeEncryptionSpecResponse.encode = function encode(message, writer) { 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 GetSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.GetSettingsRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecResponse message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.IGetSettingsRequest} message GetSettingsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - GetSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + InitializeEncryptionSpecResponse.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a GetSettingsRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSettingsRequest.decode = function decode(reader, length) { + InitializeEncryptionSpecResponse.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.name = reader.string(); - break; - } default: reader.skipType(tag & 7); break; @@ -16997,123 +19920,113 @@ }; /** - * Decodes a GetSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecResponse message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - GetSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + InitializeEncryptionSpecResponse.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a GetSettingsRequest message. + * Verifies an InitializeEncryptionSpecResponse message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - GetSettingsRequest.verify = function verify(message) { + InitializeEncryptionSpecResponse.verify = function verify(message) { if (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 GetSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecResponse message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.GetSettingsRequest} GetSettingsRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} InitializeEncryptionSpecResponse */ - GetSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest) + InitializeEncryptionSpecResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.GetSettingsRequest(); - if (object.name != null) - message.name = String(object.name); - return message; + return new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse(); }; /** - * Creates a plain object from a GetSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an InitializeEncryptionSpecResponse message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static - * @param {google.cloud.contactcenterinsights.v1.GetSettingsRequest} message GetSettingsRequest + * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse} message InitializeEncryptionSpecResponse * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - GetSettingsRequest.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; + InitializeEncryptionSpecResponse.toObject = function toObject() { + return {}; }; /** - * Converts this GetSettingsRequest to JSON. + * Converts this InitializeEncryptionSpecResponse to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @instance * @returns {Object.} JSON object */ - GetSettingsRequest.prototype.toJSON = function toJSON() { + InitializeEncryptionSpecResponse.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for GetSettingsRequest + * Gets the default type url for InitializeEncryptionSpecResponse * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.GetSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - GetSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitializeEncryptionSpecResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.GetSettingsRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse"; }; - return GetSettingsRequest; + return InitializeEncryptionSpecResponse; })(); - v1.UpdateSettingsRequest = (function() { + v1.InitializeEncryptionSpecMetadata = (function() { /** - * Properties of an UpdateSettingsRequest. + * Properties of an InitializeEncryptionSpecMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @interface IUpdateSettingsRequest - * @property {google.cloud.contactcenterinsights.v1.ISettings|null} [settings] UpdateSettingsRequest settings - * @property {google.protobuf.IFieldMask|null} [updateMask] UpdateSettingsRequest updateMask + * @interface IInitializeEncryptionSpecMetadata + * @property {google.protobuf.ITimestamp|null} [createTime] InitializeEncryptionSpecMetadata createTime + * @property {google.protobuf.ITimestamp|null} [endTime] InitializeEncryptionSpecMetadata endTime + * @property {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null} [request] InitializeEncryptionSpecMetadata request + * @property {Array.|null} [partialErrors] InitializeEncryptionSpecMetadata partialErrors */ /** - * Constructs a new UpdateSettingsRequest. + * Constructs a new InitializeEncryptionSpecMetadata. * @memberof google.cloud.contactcenterinsights.v1 - * @classdesc Represents an UpdateSettingsRequest. - * @implements IUpdateSettingsRequest + * @classdesc Represents an InitializeEncryptionSpecMetadata. + * @implements IInitializeEncryptionSpecMetadata * @constructor - * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest=} [properties] Properties to set + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata=} [properties] Properties to set */ - function UpdateSettingsRequest(properties) { + function InitializeEncryptionSpecMetadata(properties) { + this.partialErrors = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17121,89 +20034,120 @@ } /** - * UpdateSettingsRequest settings. - * @member {google.cloud.contactcenterinsights.v1.ISettings|null|undefined} settings - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * InitializeEncryptionSpecMetadata createTime. + * @member {google.protobuf.ITimestamp|null|undefined} createTime + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @instance */ - UpdateSettingsRequest.prototype.settings = null; + InitializeEncryptionSpecMetadata.prototype.createTime = null; /** - * UpdateSettingsRequest updateMask. - * @member {google.protobuf.IFieldMask|null|undefined} updateMask - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * InitializeEncryptionSpecMetadata endTime. + * @member {google.protobuf.ITimestamp|null|undefined} endTime + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @instance */ - UpdateSettingsRequest.prototype.updateMask = null; + InitializeEncryptionSpecMetadata.prototype.endTime = null; /** - * Creates a new UpdateSettingsRequest instance using the specified properties. + * InitializeEncryptionSpecMetadata request. + * @member {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest|null|undefined} request + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @instance + */ + InitializeEncryptionSpecMetadata.prototype.request = null; + + /** + * InitializeEncryptionSpecMetadata partialErrors. + * @member {Array.} partialErrors + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + * @instance + */ + InitializeEncryptionSpecMetadata.prototype.partialErrors = $util.emptyArray; + + /** + * Creates a new InitializeEncryptionSpecMetadata instance using the specified properties. * @function create - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest=} [properties] Properties to set - * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest instance + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata instance */ - UpdateSettingsRequest.create = function create(properties) { - return new UpdateSettingsRequest(properties); + InitializeEncryptionSpecMetadata.create = function create(properties) { + return new InitializeEncryptionSpecMetadata(properties); }; /** - * Encodes the specified UpdateSettingsRequest message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecMetadata message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. * @function encode - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSettingsRequest.encode = function encode(message, writer) { + InitializeEncryptionSpecMetadata.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.settings != null && Object.hasOwnProperty.call(message, "settings")) - $root.google.cloud.contactcenterinsights.v1.Settings.encode(message.settings, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.updateMask != null && Object.hasOwnProperty.call(message, "updateMask")) - $root.google.protobuf.FieldMask.encode(message.updateMask, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.createTime != null && Object.hasOwnProperty.call(message, "createTime")) + $root.google.protobuf.Timestamp.encode(message.createTime, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.endTime != null && Object.hasOwnProperty.call(message, "endTime")) + $root.google.protobuf.Timestamp.encode(message.endTime, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.request != null && Object.hasOwnProperty.call(message, "request")) + $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.encode(message.request, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.partialErrors != null && message.partialErrors.length) + for (var i = 0; i < message.partialErrors.length; ++i) + $root.google.rpc.Status.encode(message.partialErrors[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); return writer; }; /** - * Encodes the specified UpdateSettingsRequest message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.verify|verify} messages. + * Encodes the specified InitializeEncryptionSpecMetadata message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.verify|verify} messages. * @function encodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.IUpdateSettingsRequest} message UpdateSettingsRequest message or plain object to encode + * @param {google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - UpdateSettingsRequest.encodeDelimited = function encodeDelimited(message, writer) { + InitializeEncryptionSpecMetadata.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes an UpdateSettingsRequest message from the specified reader or buffer. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer. * @function decode - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSettingsRequest.decode = function decode(reader, length) { + InitializeEncryptionSpecMetadata.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.settings = $root.google.cloud.contactcenterinsights.v1.Settings.decode(reader, reader.uint32()); + message.createTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); break; } case 2: { - message.updateMask = $root.google.protobuf.FieldMask.decode(reader, reader.uint32()); + message.endTime = $root.google.protobuf.Timestamp.decode(reader, reader.uint32()); + break; + } + case 3: { + message.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.partialErrors && message.partialErrors.length)) + message.partialErrors = []; + message.partialErrors.push($root.google.rpc.Status.decode(reader, reader.uint32())); break; } default: @@ -17215,121 +20159,160 @@ }; /** - * Decodes an UpdateSettingsRequest message from the specified reader or buffer, length delimited. + * Decodes an InitializeEncryptionSpecMetadata message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - UpdateSettingsRequest.decodeDelimited = function decodeDelimited(reader) { + InitializeEncryptionSpecMetadata.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies an UpdateSettingsRequest message. + * Verifies an InitializeEncryptionSpecMetadata message. * @function verify - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - UpdateSettingsRequest.verify = function verify(message) { + InitializeEncryptionSpecMetadata.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.settings != null && message.hasOwnProperty("settings")) { - var error = $root.google.cloud.contactcenterinsights.v1.Settings.verify(message.settings); + if (message.createTime != null && message.hasOwnProperty("createTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.createTime); if (error) - return "settings." + error; + return "createTime." + error; } - if (message.updateMask != null && message.hasOwnProperty("updateMask")) { - var error = $root.google.protobuf.FieldMask.verify(message.updateMask); + if (message.endTime != null && message.hasOwnProperty("endTime")) { + var error = $root.google.protobuf.Timestamp.verify(message.endTime); if (error) - return "updateMask." + error; + return "endTime." + error; + } + if (message.request != null && message.hasOwnProperty("request")) { + var error = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.verify(message.request); + if (error) + return "request." + error; + } + if (message.partialErrors != null && message.hasOwnProperty("partialErrors")) { + if (!Array.isArray(message.partialErrors)) + return "partialErrors: array expected"; + for (var i = 0; i < message.partialErrors.length; ++i) { + var error = $root.google.rpc.Status.verify(message.partialErrors[i]); + if (error) + return "partialErrors." + error; + } } return null; }; /** - * Creates an UpdateSettingsRequest message from a plain object. Also converts values to their respective internal types. + * Creates an InitializeEncryptionSpecMetadata message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {Object.} object Plain object - * @returns {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} UpdateSettingsRequest + * @returns {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} InitializeEncryptionSpecMetadata */ - UpdateSettingsRequest.fromObject = function fromObject(object) { - if (object instanceof $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest) + InitializeEncryptionSpecMetadata.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata) return object; - var message = new $root.google.cloud.contactcenterinsights.v1.UpdateSettingsRequest(); - if (object.settings != null) { - if (typeof object.settings !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.settings: object expected"); - message.settings = $root.google.cloud.contactcenterinsights.v1.Settings.fromObject(object.settings); + var message = new $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata(); + if (object.createTime != null) { + if (typeof object.createTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.createTime: object expected"); + message.createTime = $root.google.protobuf.Timestamp.fromObject(object.createTime); } - if (object.updateMask != null) { - if (typeof object.updateMask !== "object") - throw TypeError(".google.cloud.contactcenterinsights.v1.UpdateSettingsRequest.updateMask: object expected"); - message.updateMask = $root.google.protobuf.FieldMask.fromObject(object.updateMask); + if (object.endTime != null) { + if (typeof object.endTime !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.endTime: object expected"); + message.endTime = $root.google.protobuf.Timestamp.fromObject(object.endTime); + } + if (object.request != null) { + if (typeof object.request !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.request: object expected"); + message.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.fromObject(object.request); + } + if (object.partialErrors) { + if (!Array.isArray(object.partialErrors)) + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.partialErrors: array expected"); + message.partialErrors = []; + for (var i = 0; i < object.partialErrors.length; ++i) { + if (typeof object.partialErrors[i] !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata.partialErrors: object expected"); + message.partialErrors[i] = $root.google.rpc.Status.fromObject(object.partialErrors[i]); + } } return message; }; /** - * Creates a plain object from an UpdateSettingsRequest message. Also converts values to other types if specified. + * Creates a plain object from an InitializeEncryptionSpecMetadata message. Also converts values to other types if specified. * @function toObject - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static - * @param {google.cloud.contactcenterinsights.v1.UpdateSettingsRequest} message UpdateSettingsRequest + * @param {google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata} message InitializeEncryptionSpecMetadata * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - UpdateSettingsRequest.toObject = function toObject(message, options) { + InitializeEncryptionSpecMetadata.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; + if (options.arrays || options.defaults) + object.partialErrors = []; if (options.defaults) { - object.settings = null; - object.updateMask = null; + object.createTime = null; + object.endTime = null; + object.request = null; + } + if (message.createTime != null && message.hasOwnProperty("createTime")) + object.createTime = $root.google.protobuf.Timestamp.toObject(message.createTime, options); + if (message.endTime != null && message.hasOwnProperty("endTime")) + object.endTime = $root.google.protobuf.Timestamp.toObject(message.endTime, options); + if (message.request != null && message.hasOwnProperty("request")) + object.request = $root.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest.toObject(message.request, options); + if (message.partialErrors && message.partialErrors.length) { + object.partialErrors = []; + for (var j = 0; j < message.partialErrors.length; ++j) + object.partialErrors[j] = $root.google.rpc.Status.toObject(message.partialErrors[j], options); } - if (message.settings != null && message.hasOwnProperty("settings")) - object.settings = $root.google.cloud.contactcenterinsights.v1.Settings.toObject(message.settings, options); - if (message.updateMask != null && message.hasOwnProperty("updateMask")) - object.updateMask = $root.google.protobuf.FieldMask.toObject(message.updateMask, options); return object; }; /** - * Converts this UpdateSettingsRequest to JSON. + * Converts this InitializeEncryptionSpecMetadata to JSON. * @function toJSON - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @instance * @returns {Object.} JSON object */ - UpdateSettingsRequest.prototype.toJSON = function toJSON() { + InitializeEncryptionSpecMetadata.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for UpdateSettingsRequest + * Gets the default type url for InitializeEncryptionSpecMetadata * @function getTypeUrl - * @memberof google.cloud.contactcenterinsights.v1.UpdateSettingsRequest + * @memberof google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - UpdateSettingsRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + InitializeEncryptionSpecMetadata.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.UpdateSettingsRequest"; + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata"; }; - return UpdateSettingsRequest; + return InitializeEncryptionSpecMetadata; })(); v1.CreateViewRequest = (function() { @@ -18723,6 +21706,7 @@ * @property {string|null} [agentId] Conversation agentId * @property {Object.|null} [labels] Conversation labels * @property {google.cloud.contactcenterinsights.v1.Conversation.IQualityMetadata|null} [qualityMetadata] Conversation qualityMetadata + * @property {string|null} [metadataJson] Conversation metadataJson * @property {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null} [transcript] Conversation transcript * @property {google.cloud.contactcenterinsights.v1.Conversation.Medium|null} [medium] Conversation medium * @property {google.protobuf.IDuration|null} [duration] Conversation duration @@ -18848,6 +21832,14 @@ */ Conversation.prototype.qualityMetadata = null; + /** + * Conversation metadataJson. + * @member {string} metadataJson + * @memberof google.cloud.contactcenterinsights.v1.Conversation + * @instance + */ + Conversation.prototype.metadataJson = ""; + /** * Conversation transcript. * @member {google.cloud.contactcenterinsights.v1.Conversation.ITranscript|null|undefined} transcript @@ -19016,6 +22008,8 @@ writer.uint32(/* id 21, wireType 2 =*/170).string(message.obfuscatedUserId); if (message.qualityMetadata != null && Object.hasOwnProperty.call(message, "qualityMetadata")) $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.encode(message.qualityMetadata, writer.uint32(/* id 24, wireType 2 =*/194).fork()).ldelim(); + if (message.metadataJson != null && Object.hasOwnProperty.call(message, "metadataJson")) + writer.uint32(/* id 25, wireType 2 =*/202).string(message.metadataJson); return writer; }; @@ -19117,6 +22111,10 @@ message.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.decode(reader, reader.uint32()); break; } + case 25: { + message.metadataJson = reader.string(); + break; + } case 8: { message.transcript = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.decode(reader, reader.uint32()); break; @@ -19278,6 +22276,9 @@ if (error) return "qualityMetadata." + error; } + if (message.metadataJson != null && message.hasOwnProperty("metadataJson")) + if (!$util.isString(message.metadataJson)) + return "metadataJson: string expected"; if (message.transcript != null && message.hasOwnProperty("transcript")) { var error = $root.google.cloud.contactcenterinsights.v1.Conversation.Transcript.verify(message.transcript); if (error) @@ -19400,6 +22401,8 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.qualityMetadata: object expected"); message.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.fromObject(object.qualityMetadata); } + if (object.metadataJson != null) + message.metadataJson = String(object.metadataJson); if (object.transcript != null) { if (typeof object.transcript !== "object") throw TypeError(".google.cloud.contactcenterinsights.v1.Conversation.transcript: object expected"); @@ -19502,6 +22505,7 @@ object.latestSummary = null; object.obfuscatedUserId = ""; object.qualityMetadata = null; + object.metadataJson = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -19564,6 +22568,8 @@ object.obfuscatedUserId = message.obfuscatedUserId; if (message.qualityMetadata != null && message.hasOwnProperty("qualityMetadata")) object.qualityMetadata = $root.google.cloud.contactcenterinsights.v1.Conversation.QualityMetadata.toObject(message.qualityMetadata, options); + if (message.metadataJson != null && message.hasOwnProperty("metadataJson")) + object.metadataJson = message.metadataJson; return object; }; @@ -22846,6 +25852,7 @@ * @property {Array.|null} [annotations] CallAnalysisMetadata annotations * @property {Object.|null} [entities] CallAnalysisMetadata entities * @property {Array.|null} [sentiments] CallAnalysisMetadata sentiments + * @property {google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null} [silence] CallAnalysisMetadata silence * @property {Object.|null} [intents] CallAnalysisMetadata intents * @property {Object.|null} [phraseMatchers] CallAnalysisMetadata phraseMatchers * @property {google.cloud.contactcenterinsights.v1.IIssueModelResult|null} [issueModelResult] CallAnalysisMetadata issueModelResult @@ -22895,6 +25902,14 @@ */ CallAnalysisMetadata.prototype.sentiments = $util.emptyArray; + /** + * CallAnalysisMetadata silence. + * @member {google.cloud.contactcenterinsights.v1.IConversationLevelSilence|null|undefined} silence + * @memberof google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata + * @instance + */ + CallAnalysisMetadata.prototype.silence = null; + /** * CallAnalysisMetadata intents. * @member {Object.} intents @@ -22966,6 +25981,8 @@ } if (message.issueModelResult != null && Object.hasOwnProperty.call(message, "issueModelResult")) $root.google.cloud.contactcenterinsights.v1.IssueModelResult.encode(message.issueModelResult, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.silence != null && Object.hasOwnProperty.call(message, "silence")) + $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.encode(message.silence, writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); return writer; }; @@ -23035,6 +26052,10 @@ message.sentiments.push($root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.decode(reader, reader.uint32())); break; } + case 11: { + message.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.decode(reader, reader.uint32()); + break; + } case 6: { if (message.intents === $util.emptyObject) message.intents = {}; @@ -23148,6 +26169,11 @@ return "sentiments." + error; } } + if (message.silence != null && message.hasOwnProperty("silence")) { + var error = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify(message.silence); + if (error) + return "silence." + error; + } if (message.intents != null && message.hasOwnProperty("intents")) { if (!$util.isObject(message.intents)) return "intents: object expected"; @@ -23218,6 +26244,11 @@ message.sentiments[i] = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSentiment.fromObject(object.sentiments[i]); } } + if (object.silence != null) { + if (typeof object.silence !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.silence: object expected"); + message.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.fromObject(object.silence); + } if (object.intents) { if (typeof object.intents !== "object") throw TypeError(".google.cloud.contactcenterinsights.v1.AnalysisResult.CallAnalysisMetadata.intents: object expected"); @@ -23268,8 +26299,10 @@ object.intents = {}; object.phraseMatchers = {}; } - if (options.defaults) + if (options.defaults) { object.issueModelResult = null; + object.silence = null; + } if (message.annotations && message.annotations.length) { object.annotations = []; for (var j = 0; j < message.annotations.length; ++j) @@ -23298,6 +26331,8 @@ } if (message.issueModelResult != null && message.hasOwnProperty("issueModelResult")) object.issueModelResult = $root.google.cloud.contactcenterinsights.v1.IssueModelResult.toObject(message.issueModelResult, options); + if (message.silence != null && message.hasOwnProperty("silence")) + object.silence = $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence.toObject(message.silence, options); return object; }; @@ -23813,6 +26848,238 @@ return ConversationLevelSentiment; })(); + v1.ConversationLevelSilence = (function() { + + /** + * Properties of a ConversationLevelSilence. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IConversationLevelSilence + * @property {google.protobuf.IDuration|null} [silenceDuration] ConversationLevelSilence silenceDuration + * @property {number|null} [silencePercentage] ConversationLevelSilence silencePercentage + */ + + /** + * Constructs a new ConversationLevelSilence. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents a ConversationLevelSilence. + * @implements IConversationLevelSilence + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence=} [properties] Properties to set + */ + function ConversationLevelSilence(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ConversationLevelSilence silenceDuration. + * @member {google.protobuf.IDuration|null|undefined} silenceDuration + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @instance + */ + ConversationLevelSilence.prototype.silenceDuration = null; + + /** + * ConversationLevelSilence silencePercentage. + * @member {number} silencePercentage + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @instance + */ + ConversationLevelSilence.prototype.silencePercentage = 0; + + /** + * Creates a new ConversationLevelSilence instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence instance + */ + ConversationLevelSilence.create = function create(properties) { + return new ConversationLevelSilence(properties); + }; + + /** + * Encodes the specified ConversationLevelSilence message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence} message ConversationLevelSilence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSilence.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.silenceDuration != null && Object.hasOwnProperty.call(message, "silenceDuration")) + $root.google.protobuf.Duration.encode(message.silenceDuration, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.silencePercentage != null && Object.hasOwnProperty.call(message, "silencePercentage")) + writer.uint32(/* id 2, wireType 5 =*/21).float(message.silencePercentage); + return writer; + }; + + /** + * Encodes the specified ConversationLevelSilence message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.ConversationLevelSilence.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.IConversationLevelSilence} message ConversationLevelSilence message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ConversationLevelSilence.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSilence.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.silenceDuration = $root.google.protobuf.Duration.decode(reader, reader.uint32()); + break; + } + case 2: { + message.silencePercentage = reader.float(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ConversationLevelSilence message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ConversationLevelSilence.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ConversationLevelSilence message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ConversationLevelSilence.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.silenceDuration != null && message.hasOwnProperty("silenceDuration")) { + var error = $root.google.protobuf.Duration.verify(message.silenceDuration); + if (error) + return "silenceDuration." + error; + } + if (message.silencePercentage != null && message.hasOwnProperty("silencePercentage")) + if (typeof message.silencePercentage !== "number") + return "silencePercentage: number expected"; + return null; + }; + + /** + * Creates a ConversationLevelSilence message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} ConversationLevelSilence + */ + ConversationLevelSilence.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.ConversationLevelSilence(); + if (object.silenceDuration != null) { + if (typeof object.silenceDuration !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.ConversationLevelSilence.silenceDuration: object expected"); + message.silenceDuration = $root.google.protobuf.Duration.fromObject(object.silenceDuration); + } + if (object.silencePercentage != null) + message.silencePercentage = Number(object.silencePercentage); + return message; + }; + + /** + * Creates a plain object from a ConversationLevelSilence message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {google.cloud.contactcenterinsights.v1.ConversationLevelSilence} message ConversationLevelSilence + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ConversationLevelSilence.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.silenceDuration = null; + object.silencePercentage = 0; + } + if (message.silenceDuration != null && message.hasOwnProperty("silenceDuration")) + object.silenceDuration = $root.google.protobuf.Duration.toObject(message.silenceDuration, options); + if (message.silencePercentage != null && message.hasOwnProperty("silencePercentage")) + object.silencePercentage = options.json && !isFinite(message.silencePercentage) ? String(message.silencePercentage) : message.silencePercentage; + return object; + }; + + /** + * Converts this ConversationLevelSilence to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @instance + * @returns {Object.} JSON object + */ + ConversationLevelSilence.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ConversationLevelSilence + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.ConversationLevelSilence + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ConversationLevelSilence.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.ConversationLevelSilence"; + }; + + return ConversationLevelSilence; + })(); + v1.IssueAssignment = (function() { /** @@ -28268,6 +31535,7 @@ * @property {google.protobuf.ITimestamp|null} [createTime] Issue createTime * @property {google.protobuf.ITimestamp|null} [updateTime] Issue updateTime * @property {Array.|null} [sampleUtterances] Issue sampleUtterances + * @property {string|null} [displayDescription] Issue displayDescription */ /** @@ -28326,6 +31594,14 @@ */ Issue.prototype.sampleUtterances = $util.emptyArray; + /** + * Issue displayDescription. + * @member {string} displayDescription + * @memberof google.cloud.contactcenterinsights.v1.Issue + * @instance + */ + Issue.prototype.displayDescription = ""; + /** * Creates a new Issue instance using the specified properties. * @function create @@ -28361,6 +31637,8 @@ if (message.sampleUtterances != null && message.sampleUtterances.length) for (var i = 0; i < message.sampleUtterances.length; ++i) writer.uint32(/* id 6, wireType 2 =*/50).string(message.sampleUtterances[i]); + if (message.displayDescription != null && Object.hasOwnProperty.call(message, "displayDescription")) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.displayDescription); return writer; }; @@ -28417,6 +31695,10 @@ message.sampleUtterances.push(reader.string()); break; } + case 14: { + message.displayDescription = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -28475,6 +31757,9 @@ if (!$util.isString(message.sampleUtterances[i])) return "sampleUtterances: string[] expected"; } + if (message.displayDescription != null && message.hasOwnProperty("displayDescription")) + if (!$util.isString(message.displayDescription)) + return "displayDescription: string expected"; return null; }; @@ -28511,6 +31796,8 @@ for (var i = 0; i < object.sampleUtterances.length; ++i) message.sampleUtterances[i] = String(object.sampleUtterances[i]); } + if (object.displayDescription != null) + message.displayDescription = String(object.displayDescription); return message; }; @@ -28534,6 +31821,7 @@ object.displayName = ""; object.createTime = null; object.updateTime = null; + object.displayDescription = ""; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -28548,6 +31836,8 @@ for (var j = 0; j < message.sampleUtterances.length; ++j) object.sampleUtterances[j] = message.sampleUtterances[j]; } + if (message.displayDescription != null && message.hasOwnProperty("displayDescription")) + object.displayDescription = message.displayDescription; return object; }; @@ -31392,6 +34682,233 @@ return Settings; })(); + v1.EncryptionSpec = (function() { + + /** + * Properties of an EncryptionSpec. + * @memberof google.cloud.contactcenterinsights.v1 + * @interface IEncryptionSpec + * @property {string|null} [name] EncryptionSpec name + * @property {string|null} [kmsKey] EncryptionSpec kmsKey + */ + + /** + * Constructs a new EncryptionSpec. + * @memberof google.cloud.contactcenterinsights.v1 + * @classdesc Represents an EncryptionSpec. + * @implements IEncryptionSpec + * @constructor + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec=} [properties] Properties to set + */ + function EncryptionSpec(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EncryptionSpec name. + * @member {string} name + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @instance + */ + EncryptionSpec.prototype.name = ""; + + /** + * EncryptionSpec kmsKey. + * @member {string} kmsKey + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @instance + */ + EncryptionSpec.prototype.kmsKey = ""; + + /** + * Creates a new EncryptionSpec instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec instance + */ + EncryptionSpec.create = function create(properties) { + return new EncryptionSpec(properties); + }; + + /** + * Encodes the specified EncryptionSpec message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec} message EncryptionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionSpec.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.kmsKey != null && Object.hasOwnProperty.call(message, "kmsKey")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.kmsKey); + return writer; + }; + + /** + * Encodes the specified EncryptionSpec message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.EncryptionSpec.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.IEncryptionSpec} message EncryptionSpec message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EncryptionSpec.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EncryptionSpec message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionSpec.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.EncryptionSpec(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.kmsKey = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EncryptionSpec message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EncryptionSpec.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EncryptionSpec message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EncryptionSpec.verify = function verify(message) { + if (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.kmsKey != null && message.hasOwnProperty("kmsKey")) + if (!$util.isString(message.kmsKey)) + return "kmsKey: string expected"; + return null; + }; + + /** + * Creates an EncryptionSpec message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.EncryptionSpec} EncryptionSpec + */ + EncryptionSpec.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.EncryptionSpec) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.EncryptionSpec(); + if (object.name != null) + message.name = String(object.name); + if (object.kmsKey != null) + message.kmsKey = String(object.kmsKey); + return message; + }; + + /** + * Creates a plain object from an EncryptionSpec message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} message EncryptionSpec + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EncryptionSpec.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.kmsKey = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.kmsKey != null && message.hasOwnProperty("kmsKey")) + object.kmsKey = message.kmsKey; + return object; + }; + + /** + * Converts this EncryptionSpec to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @instance + * @returns {Object.} JSON object + */ + EncryptionSpec.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EncryptionSpec + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.EncryptionSpec + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EncryptionSpec.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.EncryptionSpec"; + }; + + return EncryptionSpec; + })(); + v1.RedactionConfig = (function() { /** @@ -31839,6 +35356,7 @@ * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [startBoundary] RuntimeAnnotation startBoundary * @property {google.cloud.contactcenterinsights.v1.IAnnotationBoundary|null} [endBoundary] RuntimeAnnotation endBoundary * @property {google.cloud.contactcenterinsights.v1.IAnswerFeedback|null} [answerFeedback] RuntimeAnnotation answerFeedback + * @property {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null} [userInput] RuntimeAnnotation userInput */ /** @@ -31944,6 +35462,14 @@ */ RuntimeAnnotation.prototype.answerFeedback = null; + /** + * RuntimeAnnotation userInput. + * @member {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput|null|undefined} userInput + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @instance + */ + RuntimeAnnotation.prototype.userInput = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -32004,6 +35530,8 @@ $root.google.cloud.contactcenterinsights.v1.DialogflowInteractionData.encode(message.dialogflowInteraction, writer.uint32(/* id 10, wireType 2 =*/82).fork()).ldelim(); if (message.conversationSummarizationSuggestion != null && Object.hasOwnProperty.call(message, "conversationSummarizationSuggestion")) $root.google.cloud.contactcenterinsights.v1.ConversationSummarizationSuggestionData.encode(message.conversationSummarizationSuggestion, writer.uint32(/* id 12, wireType 2 =*/98).fork()).ldelim(); + if (message.userInput != null && Object.hasOwnProperty.call(message, "userInput")) + $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.encode(message.userInput, writer.uint32(/* id 16, wireType 2 =*/130).fork()).ldelim(); return writer; }; @@ -32082,6 +35610,10 @@ message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.decode(reader, reader.uint32()); break; } + case 16: { + message.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -32199,6 +35731,11 @@ if (error) return "answerFeedback." + error; } + if (message.userInput != null && message.hasOwnProperty("userInput")) { + var error = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify(message.userInput); + if (error) + return "userInput." + error; + } return null; }; @@ -32266,6 +35803,11 @@ throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.answerFeedback: object expected"); message.answerFeedback = $root.google.cloud.contactcenterinsights.v1.AnswerFeedback.fromObject(object.answerFeedback); } + if (object.userInput != null) { + if (typeof object.userInput !== "object") + throw TypeError(".google.cloud.contactcenterinsights.v1.RuntimeAnnotation.userInput: object expected"); + message.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.fromObject(object.userInput); + } return message; }; @@ -32288,6 +35830,7 @@ object.startBoundary = null; object.endBoundary = null; object.answerFeedback = null; + object.userInput = null; } if (message.annotationId != null && message.hasOwnProperty("annotationId")) object.annotationId = message.annotationId; @@ -32329,6 +35872,8 @@ if (options.oneofs) object.data = "conversationSummarizationSuggestion"; } + if (message.userInput != null && message.hasOwnProperty("userInput")) + object.userInput = $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.toObject(message.userInput, options); return object; }; @@ -32358,6 +35903,296 @@ return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RuntimeAnnotation"; }; + RuntimeAnnotation.UserInput = (function() { + + /** + * Properties of a UserInput. + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @interface IUserInput + * @property {string|null} [query] UserInput query + * @property {string|null} [generatorName] UserInput generatorName + * @property {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource|null} [querySource] UserInput querySource + */ + + /** + * Constructs a new UserInput. + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation + * @classdesc Represents a UserInput. + * @implements IUserInput + * @constructor + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput=} [properties] Properties to set + */ + function UserInput(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UserInput query. + * @member {string} query + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + */ + UserInput.prototype.query = ""; + + /** + * UserInput generatorName. + * @member {string} generatorName + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + */ + UserInput.prototype.generatorName = ""; + + /** + * UserInput querySource. + * @member {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource} querySource + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + */ + UserInput.prototype.querySource = 0; + + /** + * Creates a new UserInput instance using the specified properties. + * @function create + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput=} [properties] Properties to set + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput instance + */ + UserInput.create = function create(properties) { + return new UserInput(properties); + }; + + /** + * Encodes the specified UserInput message. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @function encode + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput} message UserInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInput.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.query != null && Object.hasOwnProperty.call(message, "query")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.query); + if (message.generatorName != null && Object.hasOwnProperty.call(message, "generatorName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.generatorName); + if (message.querySource != null && Object.hasOwnProperty.call(message, "querySource")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.querySource); + return writer; + }; + + /** + * Encodes the specified UserInput message, length delimited. Does not implicitly {@link google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.verify|verify} messages. + * @function encodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.IUserInput} message UserInput message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UserInput.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a UserInput message from the specified reader or buffer. + * @function decode + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInput.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.query = reader.string(); + break; + } + case 2: { + message.generatorName = reader.string(); + break; + } + case 3: { + message.querySource = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a UserInput message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UserInput.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a UserInput message. + * @function verify + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UserInput.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.query != null && message.hasOwnProperty("query")) + if (!$util.isString(message.query)) + return "query: string expected"; + if (message.generatorName != null && message.hasOwnProperty("generatorName")) + if (!$util.isString(message.generatorName)) + return "generatorName: string expected"; + if (message.querySource != null && message.hasOwnProperty("querySource")) + switch (message.querySource) { + default: + return "querySource: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a UserInput message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {Object.} object Plain object + * @returns {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} UserInput + */ + UserInput.fromObject = function fromObject(object) { + if (object instanceof $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput) + return object; + var message = new $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput(); + if (object.query != null) + message.query = String(object.query); + if (object.generatorName != null) + message.generatorName = String(object.generatorName); + switch (object.querySource) { + default: + if (typeof object.querySource === "number") { + message.querySource = object.querySource; + break; + } + break; + case "QUERY_SOURCE_UNSPECIFIED": + case 0: + message.querySource = 0; + break; + case "AGENT_QUERY": + case 1: + message.querySource = 1; + break; + case "SUGGESTED_QUERY": + case 2: + message.querySource = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a UserInput message. Also converts values to other types if specified. + * @function toObject + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput} message UserInput + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UserInput.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.query = ""; + object.generatorName = ""; + object.querySource = options.enums === String ? "QUERY_SOURCE_UNSPECIFIED" : 0; + } + if (message.query != null && message.hasOwnProperty("query")) + object.query = message.query; + if (message.generatorName != null && message.hasOwnProperty("generatorName")) + object.generatorName = message.generatorName; + if (message.querySource != null && message.hasOwnProperty("querySource")) + object.querySource = options.enums === String ? $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource[message.querySource] === undefined ? message.querySource : $root.google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource[message.querySource] : message.querySource; + return object; + }; + + /** + * Converts this UserInput to JSON. + * @function toJSON + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @instance + * @returns {Object.} JSON object + */ + UserInput.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UserInput + * @function getTypeUrl + * @memberof google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UserInput.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput"; + }; + + /** + * QuerySource enum. + * @name google.cloud.contactcenterinsights.v1.RuntimeAnnotation.UserInput.QuerySource + * @enum {number} + * @property {number} QUERY_SOURCE_UNSPECIFIED=0 QUERY_SOURCE_UNSPECIFIED value + * @property {number} AGENT_QUERY=1 AGENT_QUERY value + * @property {number} SUGGESTED_QUERY=2 SUGGESTED_QUERY value + */ + UserInput.QuerySource = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "QUERY_SOURCE_UNSPECIFIED"] = 0; + values[valuesById[1] = "AGENT_QUERY"] = 1; + values[valuesById[2] = "SUGGESTED_QUERY"] = 2; + return values; + })(); + + return UserInput; + })(); + return RuntimeAnnotation; })(); @@ -35929,6 +39764,7 @@ return "summarizationModel: enum value expected"; case 0: case 1: + case 2: break; } } @@ -35964,6 +39800,10 @@ case 1: message.summarizationModel = 1; break; + case "BASELINE_MODEL_V2_0": + case 2: + message.summarizationModel = 2; + break; } return message; }; @@ -36026,11 +39866,13 @@ * @enum {number} * @property {number} SUMMARIZATION_MODEL_UNSPECIFIED=0 SUMMARIZATION_MODEL_UNSPECIFIED value * @property {number} BASELINE_MODEL=1 BASELINE_MODEL value + * @property {number} BASELINE_MODEL_V2_0=2 BASELINE_MODEL_V2_0 value */ SummarizationConfig.SummarizationModel = (function() { var valuesById = {}, values = Object.create(valuesById); values[valuesById[0] = "SUMMARIZATION_MODEL_UNSPECIFIED"] = 0; values[valuesById[1] = "BASELINE_MODEL"] = 1; + values[valuesById[2] = "BASELINE_MODEL_V2_0"] = 2; return values; })(); diff --git a/packages/google-cloud-contactcenterinsights/protos/protos.json b/packages/google-cloud-contactcenterinsights/protos/protos.json index cc871b9033c..38487ee46f5 100644 --- a/packages/google-cloud-contactcenterinsights/protos/protos.json +++ b/packages/google-cloud-contactcenterinsights/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -503,6 +506,62 @@ } ] }, + "ExportIssueModel": { + "requestType": "ExportIssueModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{name=projects/*/locations/*/issueModels/*}:export", + "(google.api.http).body": "*", + "(google.api.method_signature)": "name", + "(google.longrunning.operation_info).response_type": "ExportIssueModelResponse", + "(google.longrunning.operation_info).metadata_type": "ExportIssueModelMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{name=projects/*/locations/*/issueModels/*}:export", + "body": "*" + } + }, + { + "(google.api.method_signature)": "name" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ExportIssueModelResponse", + "metadata_type": "ExportIssueModelMetadata" + } + } + ] + }, + "ImportIssueModel": { + "requestType": "ImportIssueModelRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{parent=projects/*/locations/*}/issueModels:import", + "(google.api.http).body": "*", + "(google.api.method_signature)": "parent", + "(google.longrunning.operation_info).response_type": "ImportIssueModelResponse", + "(google.longrunning.operation_info).metadata_type": "ImportIssueModelMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{parent=projects/*/locations/*}/issueModels:import", + "body": "*" + } + }, + { + "(google.api.method_signature)": "parent" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "ImportIssueModelResponse", + "metadata_type": "ImportIssueModelMetadata" + } + } + ] + }, "GetIssue": { "requestType": "GetIssueRequest", "responseType": "Issue", @@ -745,6 +804,52 @@ } ] }, + "GetEncryptionSpec": { + "requestType": "GetEncryptionSpecRequest", + "responseType": "EncryptionSpec", + "options": { + "(google.api.http).get": "/v1/{name=projects/*/locations/*/encryptionSpec}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1/{name=projects/*/locations/*/encryptionSpec}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "InitializeEncryptionSpec": { + "requestType": "InitializeEncryptionSpecRequest", + "responseType": "google.longrunning.Operation", + "options": { + "(google.api.http).post": "/v1/{encryption_spec.name=projects/*/locations/*/encryptionSpec}:initialize", + "(google.api.http).body": "*", + "(google.api.method_signature)": "encryption_spec", + "(google.longrunning.operation_info).response_type": "InitializeEncryptionSpecResponse", + "(google.longrunning.operation_info).metadata_type": "InitializeEncryptionSpecMetadata" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1/{encryption_spec.name=projects/*/locations/*/encryptionSpec}:initialize", + "body": "*" + } + }, + { + "(google.api.method_signature)": "encryption_spec" + }, + { + "(google.longrunning.operation_info)": { + "response_type": "InitializeEncryptionSpecResponse", + "metadata_type": "InitializeEncryptionSpecMetadata" + } + } + ] + }, "CreateView": { "requestType": "CreateViewRequest", "responseType": "View", @@ -1093,6 +1198,13 @@ "type": "string", "id": 4 }, + "orderBy": { + "type": "string", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, "view": { "type": "ConversationView", "id": 5 @@ -1170,6 +1282,11 @@ "oneof": [ "transcriptObjectConfig" ] + }, + "_sampleSize": { + "oneof": [ + "sampleSize" + ] } }, "fields": { @@ -1206,10 +1323,25 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "sampleSize": { + "type": "int32", + "id": 7, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } } }, "nested": { "GcsSource": { + "oneofs": { + "_metadataBucketUri": { + "oneof": [ + "metadataBucketUri" + ] + } + }, "fields": { "bucketUri": { "type": "string", @@ -1224,6 +1356,22 @@ "options": { "(google.api.field_behavior)": "OPTIONAL" } + }, + "metadataBucketUri": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL", + "proto3_optional": true + } + }, + "customMetadataKeys": { + "rule": "repeated", + "type": "string", + "id": 12, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } } }, "nested": { @@ -1251,7 +1399,10 @@ "fields": { "agentId": { "type": "string", - "id": 1 + "id": 1, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } }, "agentChannel": { "type": "int32", @@ -1844,6 +1995,123 @@ } } }, + "ExportIssueModelRequest": { + "oneofs": { + "Destination": { + "oneof": [ + "gcsDestination" + ] + } + }, + "fields": { + "gcsDestination": { + "type": "GcsDestination", + "id": 2 + }, + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/IssueModel" + } + } + }, + "nested": { + "GcsDestination": { + "fields": { + "objectUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ExportIssueModelResponse": { + "fields": {} + }, + "ExportIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "ExportIssueModelRequest", + "id": 3 + } + } + }, + "ImportIssueModelRequest": { + "oneofs": { + "Source": { + "oneof": [ + "gcsSource" + ] + } + }, + "fields": { + "gcsSource": { + "type": "GcsSource", + "id": 2 + }, + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "locations.googleapis.com/Location" + } + }, + "createNewModel": { + "type": "bool", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + }, + "nested": { + "GcsSource": { + "fields": { + "objectUri": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + } + } + }, + "ImportIssueModelResponse": { + "fields": {} + }, + "ImportIssueModelMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1 + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2 + }, + "request": { + "type": "ImportIssueModelRequest", + "id": 3 + } + } + }, "GetIssueRequest": { "fields": { "name": { @@ -2049,6 +2317,62 @@ } } }, + "GetEncryptionSpecRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "contactcenterinsights.googleapis.com/EncryptionSpec" + } + } + } + }, + "InitializeEncryptionSpecRequest": { + "fields": { + "encryptionSpec": { + "type": "EncryptionSpec", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "InitializeEncryptionSpecResponse": { + "fields": {} + }, + "InitializeEncryptionSpecMetadata": { + "fields": { + "createTime": { + "type": "google.protobuf.Timestamp", + "id": 1, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "endTime": { + "type": "google.protobuf.Timestamp", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "request": { + "type": "InitializeEncryptionSpecRequest", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "partialErrors": { + "rule": "repeated", + "type": "google.rpc.Status", + "id": 4 + } + } + }, "CreateViewRequest": { "fields": { "parent": { @@ -2220,6 +2544,13 @@ "type": "QualityMetadata", "id": 24 }, + "metadataJson": { + "type": "string", + "id": 25, + "options": { + "(google.api.field_behavior)": "INPUT_ONLY" + } + }, "transcript": { "type": "Transcript", "id": 8, @@ -2556,6 +2887,10 @@ "type": "ConversationLevelSentiment", "id": 4 }, + "silence": { + "type": "ConversationLevelSilence", + "id": 11 + }, "intents": { "keyType": "string", "type": "Intent", @@ -2602,6 +2937,18 @@ } } }, + "ConversationLevelSilence": { + "fields": { + "silenceDuration": { + "type": "google.protobuf.Duration", + "id": 1 + }, + "silencePercentage": { + "type": "float", + "id": 2 + } + } + }, "IssueAssignment": { "fields": { "issue": { @@ -2985,6 +3332,10 @@ "options": { "(google.api.field_behavior)": "OUTPUT_ONLY" } + }, + "displayDescription": { + "type": "string", + "id": 14 } } }, @@ -3242,6 +3593,28 @@ } } }, + "EncryptionSpec": { + "options": { + "(google.api.resource).type": "contactcenterinsights.googleapis.com/EncryptionSpec", + "(google.api.resource).pattern": "projects/{project}/locations/{location}/encryptionSpec" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IMMUTABLE" + } + }, + "kmsKey": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, "RedactionConfig": { "fields": { "deidentifyTemplate": { @@ -3322,6 +3695,37 @@ "answerFeedback": { "type": "AnswerFeedback", "id": 5 + }, + "userInput": { + "type": "UserInput", + "id": 16 + } + }, + "nested": { + "UserInput": { + "fields": { + "query": { + "type": "string", + "id": 1 + }, + "generatorName": { + "type": "string", + "id": 2 + }, + "querySource": { + "type": "QuerySource", + "id": 3 + } + }, + "nested": { + "QuerySource": { + "values": { + "QUERY_SOURCE_UNSPECIFIED": 0, + "AGENT_QUERY": 1, + "SUGGESTED_QUERY": 2 + } + } + } } } }, @@ -3661,7 +4065,8 @@ "SummarizationModel": { "values": { "SUMMARIZATION_MODEL_UNSPECIFIED": 0, - "BASELINE_MODEL": 1 + "BASELINE_MODEL": 1, + "BASELINE_MODEL_V2_0": 2 } } } diff --git a/packages/google-cloud-contactcenterinsights/samples/README.md b/packages/google-cloud-contactcenterinsights/samples/README.md index a88e0768807..6fd0853ae39 100644 --- a/packages/google-cloud-contactcenterinsights/samples/README.md +++ b/packages/google-cloud-contactcenterinsights/samples/README.md @@ -29,14 +29,18 @@ * [Contact_center_insights.delete_view](#contact_center_insights.delete_view) * [Contact_center_insights.deploy_issue_model](#contact_center_insights.deploy_issue_model) * [Contact_center_insights.export_insights_data](#contact_center_insights.export_insights_data) + * [Contact_center_insights.export_issue_model](#contact_center_insights.export_issue_model) * [Contact_center_insights.get_analysis](#contact_center_insights.get_analysis) * [Contact_center_insights.get_conversation](#contact_center_insights.get_conversation) + * [Contact_center_insights.get_encryption_spec](#contact_center_insights.get_encryption_spec) * [Contact_center_insights.get_issue](#contact_center_insights.get_issue) * [Contact_center_insights.get_issue_model](#contact_center_insights.get_issue_model) * [Contact_center_insights.get_phrase_matcher](#contact_center_insights.get_phrase_matcher) * [Contact_center_insights.get_settings](#contact_center_insights.get_settings) * [Contact_center_insights.get_view](#contact_center_insights.get_view) + * [Contact_center_insights.import_issue_model](#contact_center_insights.import_issue_model) * [Contact_center_insights.ingest_conversations](#contact_center_insights.ingest_conversations) + * [Contact_center_insights.initialize_encryption_spec](#contact_center_insights.initialize_encryption_spec) * [Contact_center_insights.list_analyses](#contact_center_insights.list_analyses) * [Contact_center_insights.list_conversations](#contact_center_insights.list_conversations) * [Contact_center_insights.list_issue_models](#contact_center_insights.list_issue_models) @@ -357,6 +361,23 @@ __Usage:__ +### Contact_center_insights.export_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js` + + +----- + + + + ### Contact_center_insights.get_analysis View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_analysis.js). @@ -391,6 +412,23 @@ __Usage:__ +### Contact_center_insights.get_encryption_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js` + + +----- + + + + ### Contact_center_insights.get_issue View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_issue.js). @@ -476,6 +514,23 @@ __Usage:__ +### Contact_center_insights.import_issue_model + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js` + + +----- + + + + ### Contact_center_insights.ingest_conversations View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js). @@ -493,6 +548,23 @@ __Usage:__ +### Contact_center_insights.initialize_encryption_spec + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js,samples/README.md) + +__Usage:__ + + +`node packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js` + + +----- + + + + ### Contact_center_insights.list_analyses View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_analyses.js). diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js new file mode 100644 index 00000000000..6dfdb593827 --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.export_issue_model.js @@ -0,0 +1,66 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Google Cloud Storage URI to export the issue model to. + */ + // const gcsDestination = {} + /** + * Required. The issue model to export. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callExportIssueModel() { + // Construct request + const request = { + name, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.exportIssueModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callExportIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js new file mode 100644 index 00000000000..93f0c757ecb --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.get_encryption_spec.js @@ -0,0 +1,61 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 encryption spec resource to get. + */ + // const name = 'abc123' + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callGetEncryptionSpec() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await contactcenterinsightsClient.getEncryptionSpec(request); + console.log(response); + } + + callGetEncryptionSpec(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js new file mode 100644 index 00000000000..be25ea5747b --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.import_issue_model.js @@ -0,0 +1,72 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will require modifications to work. + * It may require correct/in-range values for request initialization. + * TODO(developer): Uncomment these variables before running the sample. + */ + /** + * Google Cloud Storage source message. + */ + // const gcsSource = {} + /** + * Required. The parent resource of the issue model. + */ + // const parent = 'abc123' + /** + * Optional. If set to true, will create an issue model from the imported file + * with randomly generated IDs for the issue model and corresponding issues. + * Otherwise, replaces an existing model with the same ID as the file. + */ + // const createNewModel = true + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callImportIssueModel() { + // Construct request + const request = { + parent, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.importIssueModel(request); + const [response] = await operation.promise(); + console.log(response); + } + + callImportIssueModel(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js index 7f5c33a883c..270c1c8ef89 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.ingest_conversations.js @@ -55,6 +55,13 @@ function main(parent) { * the config specified in Settings. */ // const speechConfig = {} + /** + * Optional. If set, this fields indicates the number of objects to ingest + * from the Cloud Storage bucket. If empty, the entire bucket will be + * ingested. Unless they are first deleted, conversations produced through + * sampling won't be ingested by subsequent ingest requests. + */ + // const sampleSize = 1234 // Imports the Contactcenterinsights library const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js new file mode 100644 index 00000000000..eec636de9ae --- /dev/null +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.initialize_encryption_spec.js @@ -0,0 +1,65 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(encryptionSpec) { + // [START contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 encryption spec used for CMEK encryption. It is required that + * the kms key is in the same region as the endpoint. The same key will be + * used for all provisioned resources, if encryption is available. If the + * kms_key_name is left empty, no encryption will be enforced. + */ + // const encryptionSpec = {} + + // Imports the Contactcenterinsights library + const {ContactCenterInsightsClient} = require('@google-cloud/contact-center-insights').v1; + + // Instantiates a client + const contactcenterinsightsClient = new ContactCenterInsightsClient(); + + async function callInitializeEncryptionSpec() { + // Construct request + const request = { + encryptionSpec, + }; + + // Run request + const [operation] = await contactcenterinsightsClient.initializeEncryptionSpec(request); + const [response] = await operation.promise(); + console.log(response); + } + + callInitializeEncryptionSpec(); + // [END contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js index cf8ab20164c..f86184b80ce 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.list_conversations.js @@ -34,7 +34,7 @@ function main(parent) { // const parent = 'abc123' /** * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * size ranges from 0 to 100,000 inclusive. If the page size is zero or * unspecified, a default page size of 100 will be chosen. Note that a call * might return fewer results than the requested page size. */ @@ -50,6 +50,22 @@ function main(parent) { * conversations with specific properties. */ // const filter = 'abc123' + /** + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see Google AIPs + * Ordering (https://google.aip.dev/132#ordering). + */ + // const orderBy = 'abc123' /** * The level of details of the conversation. Default is `BASIC`. */ diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js index fb08645ac10..1ee366a6c61 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/contact_center_insights.update_conversation.js @@ -33,7 +33,19 @@ function main(conversation) { */ // const conversation = {} /** - * The list of fields to be updated. + * The list of fields to be updated. All possible fields can be updated by + * passing `*`, or a subset of the following updateable fields can be + * provided: + * * `agent_id` + * * `language_code` + * * `labels` + * * `metadata` + * * `quality_metadata` + * * `call_metadata` + * * `start_time` + * * `expire_time` or `ttl` + * * `data_source.gcs_source.audio_uri` or + * `data_source.dialogflow_source.audio_uri` */ // const updateMask = {} diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json index e66f43d7261..ce288bd2ae9 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -15,7 +15,7 @@ "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateConversation_async", "title": "ContactCenterInsights createConversation Sample", "origin": "API_DEFINITION", - "description": " Creates a conversation.", + "description": " Creates a conversation. Note that this method does not support audio transcription or redaction. Use `conversations.upload` instead.", "canonical": true, "file": "contact_center_insights.create_conversation.js", "language": "JAVASCRIPT", @@ -63,7 +63,7 @@ "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_UploadConversation_async", "title": "ContactCenterInsights uploadConversation Sample", "origin": "API_DEFINITION", - "description": " Create a longrunning conversation upload operation. This method differs from CreateConversation by allowing audio transcription and optional DLP redaction.", + "description": " Create a long-running conversation upload operation. This method differs from `CreateConversation` by allowing audio transcription and optional DLP redaction.", "canonical": true, "file": "contact_center_insights.upload_conversation.js", "language": "JAVASCRIPT", @@ -126,7 +126,7 @@ "segments": [ { "start": 25, - "end": 57, + "end": 69, "type": "FULL" } ], @@ -214,7 +214,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 93, "type": "FULL" } ], @@ -239,6 +239,10 @@ "name": "filter", "type": "TYPE_STRING" }, + { + "name": "order_by", + "type": "TYPE_STRING" + }, { "name": "view", "type": ".google.cloud.contactcenterinsights.v1.ConversationView" @@ -594,7 +598,7 @@ "segments": [ { "start": 25, - "end": 77, + "end": 84, "type": "FULL" } ], @@ -626,6 +630,10 @@ { "name": "speech_config", "type": ".google.cloud.contactcenterinsights.v1.SpeechConfig" + }, + { + "name": "sample_size", + "type": "TYPE_INT32" } ], "resultType": ".google.longrunning.Operation", @@ -987,6 +995,98 @@ } } }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async", + "title": "ContactCenterInsights exportIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Exports an issue model to the provided destination.", + "canonical": true, + "file": "contact_center_insights.export_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 58, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ExportIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportIssueModel", + "async": true, + "parameters": [ + { + "name": "gcs_destination", + "type": ".google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination" + }, + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ExportIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ExportIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async", + "title": "ContactCenterInsights importIssueModel Sample", + "origin": "API_DEFINITION", + "description": " Imports an issue model from a Cloud Storage bucket.", + "canonical": true, + "file": "contact_center_insights.import_issue_model.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 64, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ImportIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ImportIssueModel", + "async": true, + "parameters": [ + { + "name": "gcs_source", + "type": ".google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource" + }, + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "create_new_model", + "type": "TYPE_BOOL" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "ImportIssueModel", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.ImportIssueModel", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetIssue_async", "title": "ContactCenterInsights getIssue Sample", @@ -1539,6 +1639,86 @@ } } }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async", + "title": "ContactCenterInsights getEncryptionSpec Sample", + "origin": "API_DEFINITION", + "description": " Gets location-level encryption key specification.", + "canonical": true, + "file": "contact_center_insights.get_encryption_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 53, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetEncryptionSpec", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetEncryptionSpec", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.cloud.contactcenterinsights.v1.EncryptionSpec", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "GetEncryptionSpec", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.GetEncryptionSpec", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, + { + "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async", + "title": "ContactCenterInsights initializeEncryptionSpec Sample", + "origin": "API_DEFINITION", + "description": " Initializes a location-level encryption key specification. An error will be thrown if the location has resources already created before the initialization. Once the encryption specification is initialized at a location, it is immutable and all newly created resources under the location will be encrypted with the existing specification.", + "canonical": true, + "file": "contact_center_insights.initialize_encryption_spec.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 57, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "InitializeEncryptionSpec", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.InitializeEncryptionSpec", + "async": true, + "parameters": [ + { + "name": "encryption_spec", + "type": ".google.cloud.contactcenterinsights.v1.EncryptionSpec" + } + ], + "resultType": ".google.longrunning.Operation", + "client": { + "shortName": "ContactCenterInsightsClient", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsightsClient" + }, + "method": { + "shortName": "InitializeEncryptionSpec", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights.InitializeEncryptionSpec", + "service": { + "shortName": "ContactCenterInsights", + "fullName": "google.cloud.contactcenterinsights.v1.ContactCenterInsights" + } + } + } + }, { "regionTag": "contactcenterinsights_v1_generated_ContactCenterInsights_CreateView_async", "title": "ContactCenterInsights createView Sample", diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts index 92c7a0116d3..1ccbfbd1d80 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client.ts @@ -209,6 +209,9 @@ export class ContactCenterInsightsClient { conversationPathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/conversations/{conversation}' ), + encryptionSpecPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/encryptionSpec' + ), issuePathTemplate: new this._gaxModule.PathTemplate( 'projects/{project}/locations/{location}/issueModels/{issue_model}/issues/{issue}' ), @@ -343,6 +346,24 @@ export class ContactCenterInsightsClient { const undeployIssueModelMetadata = protoFilesRoot.lookup( '.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata' ) as gax.protobuf.Type; + const exportIssueModelResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse' + ) as gax.protobuf.Type; + const exportIssueModelMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata' + ) as gax.protobuf.Type; + const importIssueModelResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse' + ) as gax.protobuf.Type; + const importIssueModelMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata' + ) as gax.protobuf.Type; + const initializeEncryptionSpecResponse = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse' + ) as gax.protobuf.Type; + const initializeEncryptionSpecMetadata = protoFilesRoot.lookup( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata' + ) as gax.protobuf.Type; this.descriptors.longrunning = { uploadConversation: new this._gaxModule.LongrunningDescriptor( @@ -403,6 +424,25 @@ export class ContactCenterInsightsClient { undeployIssueModelResponse.decode.bind(undeployIssueModelResponse), undeployIssueModelMetadata.decode.bind(undeployIssueModelMetadata) ), + exportIssueModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + exportIssueModelResponse.decode.bind(exportIssueModelResponse), + exportIssueModelMetadata.decode.bind(exportIssueModelMetadata) + ), + importIssueModel: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + importIssueModelResponse.decode.bind(importIssueModelResponse), + importIssueModelMetadata.decode.bind(importIssueModelMetadata) + ), + initializeEncryptionSpec: new this._gaxModule.LongrunningDescriptor( + this.operationsClient, + initializeEncryptionSpecResponse.decode.bind( + initializeEncryptionSpecResponse + ), + initializeEncryptionSpecMetadata.decode.bind( + initializeEncryptionSpecMetadata + ) + ), }; // Put together the default options sent with requests. @@ -477,6 +517,8 @@ export class ContactCenterInsightsClient { 'deleteIssueModel', 'deployIssueModel', 'undeployIssueModel', + 'exportIssueModel', + 'importIssueModel', 'getIssue', 'listIssues', 'updateIssue', @@ -490,6 +532,8 @@ export class ContactCenterInsightsClient { 'calculateStats', 'getSettings', 'updateSettings', + 'getEncryptionSpec', + 'initializeEncryptionSpec', 'createView', 'getView', 'listViews', @@ -614,6 +658,8 @@ export class ContactCenterInsightsClient { // ------------------- /** * Creates a conversation. + * Note that this method does not support audio transcription or redaction. + * Use `conversations.upload` instead. * * @param {Object} request * The request object that will be sent. @@ -725,7 +771,20 @@ export class ContactCenterInsightsClient { * @param {google.cloud.contactcenterinsights.v1.Conversation} request.conversation * Required. The new values for the conversation. * @param {google.protobuf.FieldMask} request.updateMask - * The list of fields to be updated. + * The list of fields to be updated. All possible fields can be updated by + * passing `*`, or a subset of the following updateable fields can be + * provided: + * + * * `agent_id` + * * `language_code` + * * `labels` + * * `metadata` + * * `quality_metadata` + * * `call_metadata` + * * `start_time` + * * `expire_time` or `ttl` + * * `data_source.gcs_source.audio_uri` or + * `data_source.dialogflow_source.audio_uri` * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -2659,6 +2718,102 @@ export class ContactCenterInsightsClient { this.initialize(); return this.innerApiCalls.updateSettings(request, options, callback); } + /** + * Gets location-level encryption key specification. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the encryption spec resource to get. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.cloud.contactcenterinsights.v1.EncryptionSpec|EncryptionSpec}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.get_encryption_spec.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_GetEncryptionSpec_async + */ + getEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + options?: CallOptions + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | undefined + ), + {} | undefined, + ] + >; + getEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + options: CallOptions, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + callback: Callback< + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec, + ( + | protos.google.cloud.contactcenterinsights.v1.IGetEncryptionSpecRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getEncryptionSpec(request, options, callback); + } /** * Creates a view. * @@ -3046,8 +3201,8 @@ export class ContactCenterInsightsClient { } /** - * Create a longrunning conversation upload operation. This method differs - * from CreateConversation by allowing audio transcription and optional DLP + * Create a long-running conversation upload operation. This method differs + * from `CreateConversation` by allowing audio transcription and optional DLP * redaction. * * @param {Object} request @@ -3656,6 +3811,11 @@ export class ContactCenterInsightsClient { * @param {google.cloud.contactcenterinsights.v1.SpeechConfig} [request.speechConfig] * Optional. Default Speech-to-Text configuration. Optional, will default to * the config specified in Settings. + * @param {number} [request.sampleSize] + * Optional. If set, this fields indicates the number of objects to ingest + * from the Cloud Storage bucket. If empty, the entire bucket will be + * ingested. Unless they are first deleted, conversations produced through + * sampling won't be ingested by subsequent ingest 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. @@ -4480,6 +4640,433 @@ export class ContactCenterInsightsClient { protos.google.cloud.contactcenterinsights.v1.UndeployIssueModelMetadata >; } + /** + * Exports an issue model to the provided destination. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.ExportIssueModelRequest.GcsDestination} request.gcsDestination + * Google Cloud Storage URI to export the issue model to. + * @param {string} request.name + * Required. The issue model to 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 + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async + */ + exportIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + exportIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + exportIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IExportIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >, + 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({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.exportIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `exportIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.export_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ExportIssueModel_async + */ + async checkExportIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata + > + > { + 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.exportIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ExportIssueModelMetadata + >; + } + /** + * Imports an issue model from a Cloud Storage bucket. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.ImportIssueModelRequest.GcsSource} request.gcsSource + * Google Cloud Storage source message. + * @param {string} request.parent + * Required. The parent resource of the issue model. + * @param {boolean} [request.createNewModel] + * Optional. If set to true, will create an issue model from the imported file + * with randomly generated IDs for the issue model and corresponding issues. + * Otherwise, replaces an existing model with the same ID as the file. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.import_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async + */ + importIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + importIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importIssueModel( + request: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + importIssueModel( + request?: protos.google.cloud.contactcenterinsights.v1.IImportIssueModelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.importIssueModel(request, options, callback); + } + /** + * Check the status of the long running operation returned by `importIssueModel()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.import_issue_model.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_ImportIssueModel_async + */ + async checkImportIssueModelProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + > + > { + 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.importIssueModel, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.ImportIssueModelMetadata + >; + } + /** + * Initializes a location-level encryption key specification. An error will + * be thrown if the location has resources already created before the + * initialization. Once the encryption specification is initialized at a + * location, it is immutable and all newly created resources under the + * location will be encrypted with the existing specification. + * + * @param {Object} request + * The request object that will be sent. + * @param {google.cloud.contactcenterinsights.v1.EncryptionSpec} request.encryptionSpec + * Required. The encryption spec used for CMEK encryption. It is required that + * the kms key is in the same region as the endpoint. The same key will be + * used for all provisioned resources, if encryption is available. If the + * kms_key_name is left empty, no encryption will be enforced. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing + * a long running operation. Its `promise()` method returns a promise + * you can `await` for. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.initialize_encryption_spec.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async + */ + initializeEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + options?: CallOptions + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | undefined, + {} | undefined, + ] + >; + initializeEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + options: CallOptions, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + initializeEncryptionSpec( + request: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + callback: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): void; + initializeEncryptionSpec( + request?: protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecRequest, + optionsOrCallback?: + | CallOptions + | Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + >, + callback?: Callback< + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + protos.google.longrunning.IOperation | null | undefined, + {} | null | undefined + > + ): Promise< + [ + LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >, + 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({ + 'encryption_spec.name': request.encryptionSpec!.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.initializeEncryptionSpec( + request, + options, + callback + ); + } + /** + * Check the status of the long running operation returned by `initializeEncryptionSpec()`. + * @param {String} name + * The operation name that will be passed. + * @returns {Promise} - The promise which resolves to an object. + * The decoded operation object has result and metadata field to get information from. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#long-running-operations | documentation } + * for more details and examples. + * @example include:samples/generated/v1/contact_center_insights.initialize_encryption_spec.js + * region_tag:contactcenterinsights_v1_generated_ContactCenterInsights_InitializeEncryptionSpec_async + */ + async checkInitializeEncryptionSpecProgress( + name: string + ): Promise< + LROperation< + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + > + > { + 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.initializeEncryptionSpec, + this._gaxModule.createDefaultBackoffSettings() + ); + return decodeOperation as LROperation< + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecMetadata + >; + } /** * Lists conversations. * @@ -4489,7 +5076,7 @@ export class ContactCenterInsightsClient { * Required. The parent resource of the conversation. * @param {number} request.pageSize * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * size ranges from 0 to 100,000 inclusive. If the page size is zero or * unspecified, a default page size of 100 will be chosen. Note that a call * might return fewer results than the requested page size. * @param {string} request.pageToken @@ -4499,6 +5086,22 @@ export class ContactCenterInsightsClient { * @param {string} request.filter * A filter to reduce results to a specific subset. Useful for querying * conversations with specific properties. + * @param {string} [request.orderBy] + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see [Google AIPs + * Ordering](https://google.aip.dev/132#ordering). * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view * The level of details of the conversation. Default is `BASIC`. * @param {object} [options] @@ -4596,7 +5199,7 @@ export class ContactCenterInsightsClient { * Required. The parent resource of the conversation. * @param {number} request.pageSize * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * size ranges from 0 to 100,000 inclusive. If the page size is zero or * unspecified, a default page size of 100 will be chosen. Note that a call * might return fewer results than the requested page size. * @param {string} request.pageToken @@ -4606,6 +5209,22 @@ export class ContactCenterInsightsClient { * @param {string} request.filter * A filter to reduce results to a specific subset. Useful for querying * conversations with specific properties. + * @param {string} [request.orderBy] + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see [Google AIPs + * Ordering](https://google.aip.dev/132#ordering). * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view * The level of details of the conversation. Default is `BASIC`. * @param {object} [options] @@ -4651,7 +5270,7 @@ export class ContactCenterInsightsClient { * Required. The parent resource of the conversation. * @param {number} request.pageSize * The maximum number of conversations to return in the response. A valid page - * size ranges from 0 to 1,000 inclusive. If the page size is zero or + * size ranges from 0 to 100,000 inclusive. If the page size is zero or * unspecified, a default page size of 100 will be chosen. Note that a call * might return fewer results than the requested page size. * @param {string} request.pageToken @@ -4661,6 +5280,22 @@ export class ContactCenterInsightsClient { * @param {string} request.filter * A filter to reduce results to a specific subset. Useful for querying * conversations with specific properties. + * @param {string} [request.orderBy] + * Optional. The attribute by which to order conversations in the response. + * If empty, conversations will be ordered by descending creation time. + * Supported values are one of the following: + * + * * create_time + * * customer_satisfaction_rating + * * duration + * * latest_analysis + * * start_time + * * turn_count + * + * The default sort order is ascending. To specify order, append `asc` or + * `desc` (`create_time desc`). + * For more details, see [Google AIPs + * Ordering](https://google.aip.dev/132#ordering). * @param {google.cloud.contactcenterinsights.v1.ConversationView} request.view * The level of details of the conversation. Default is `BASIC`. * @param {object} [options] @@ -5616,6 +6251,46 @@ export class ContactCenterInsightsClient { .conversation; } + /** + * Return a fully-qualified encryptionSpec resource name string. + * + * @param {string} project + * @param {string} location + * @returns {string} Resource name string. + */ + encryptionSpecPath(project: string, location: string) { + return this.pathTemplates.encryptionSpecPathTemplate.render({ + project: project, + location: location, + }); + } + + /** + * Parse the project from EncryptionSpec resource. + * + * @param {string} encryptionSpecName + * A fully-qualified path representing EncryptionSpec resource. + * @returns {string} A string representing the project. + */ + matchProjectFromEncryptionSpecName(encryptionSpecName: string) { + return this.pathTemplates.encryptionSpecPathTemplate.match( + encryptionSpecName + ).project; + } + + /** + * Parse the location from EncryptionSpec resource. + * + * @param {string} encryptionSpecName + * A fully-qualified path representing EncryptionSpec resource. + * @returns {string} A string representing the location. + */ + matchLocationFromEncryptionSpecName(encryptionSpecName: string) { + return this.pathTemplates.encryptionSpecPathTemplate.match( + encryptionSpecName + ).location; + } + /** * Return a fully-qualified issue resource name string. * diff --git a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json index 220319ec3d7..ab40ab3cf3e 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json +++ b/packages/google-cloud-contactcenterinsights/src/v1/contact_center_insights_client_config.json @@ -137,6 +137,16 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "ExportIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "ImportIssueModel": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "GetIssue": { "timeout_millis": 60000, "retry_codes_name": "unavailable", @@ -202,6 +212,16 @@ "retry_codes_name": "unavailable", "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" }, + "GetEncryptionSpec": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, + "InitializeEncryptionSpec": { + "timeout_millis": 60000, + "retry_codes_name": "unavailable", + "retry_params_name": "ce5b960a6ed052e690863808e4f0deff3dc7d49f" + }, "CreateView": { "timeout_millis": 60000, "retry_codes_name": "unavailable", diff --git a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json index ae53c8c250d..0ea1d0cf82e 100644 --- a/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json +++ b/packages/google-cloud-contactcenterinsights/src/v1/gapic_metadata.json @@ -115,6 +115,11 @@ "updateSettings" ] }, + "GetEncryptionSpec": { + "methods": [ + "getEncryptionSpec" + ] + }, "CreateView": { "methods": [ "createView" @@ -185,6 +190,21 @@ "undeployIssueModel" ] }, + "ExportIssueModel": { + "methods": [ + "exportIssueModel" + ] + }, + "ImportIssueModel": { + "methods": [ + "importIssueModel" + ] + }, + "InitializeEncryptionSpec": { + "methods": [ + "initializeEncryptionSpec" + ] + }, "ListConversations": { "methods": [ "listConversations", @@ -323,6 +343,11 @@ "updateSettings" ] }, + "GetEncryptionSpec": { + "methods": [ + "getEncryptionSpec" + ] + }, "CreateView": { "methods": [ "createView" @@ -393,6 +418,21 @@ "undeployIssueModel" ] }, + "ExportIssueModel": { + "methods": [ + "exportIssueModel" + ] + }, + "ImportIssueModel": { + "methods": [ + "importIssueModel" + ] + }, + "InitializeEncryptionSpec": { + "methods": [ + "initializeEncryptionSpec" + ] + }, "ListConversations": { "methods": [ "listConversations", diff --git a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts index b9054943e7e..1d9f6eb8ffb 100644 --- a/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts +++ b/packages/google-cloud-contactcenterinsights/test/gapic_contact_center_insights_v1.ts @@ -3200,6 +3200,140 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); + describe('getEncryptionSpec', () => { + it('invokes getEncryptionSpec without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.EncryptionSpec() + ); + client.innerApiCalls.getEncryptionSpec = stubSimpleCall(expectedResponse); + const [response] = await client.getEncryptionSpec(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEncryptionSpec without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.EncryptionSpec() + ); + client.innerApiCalls.getEncryptionSpec = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getEncryptionSpec( + request, + ( + err?: Error | null, + result?: protos.google.cloud.contactcenterinsights.v1.IEncryptionSpec | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEncryptionSpec with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getEncryptionSpec = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getEncryptionSpec(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getEncryptionSpec with closed client', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.GetEncryptionSpecRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getEncryptionSpec(request), expectedError); + }); + }); + describe('createView', () => { it('invokes createView without error', async () => { const client = @@ -5745,8 +5879,8 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); - describe('listConversations', () => { - it('invokes listConversations without error', async () => { + describe('exportIssueModel', () => { + it('invokes exportIssueModel without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5754,39 +5888,33 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - ]; - client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); - const [response] = await client.listConversations(request); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.exportIssueModel(request); + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.exportIssueModel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.exportIssueModel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversations without error using callback', async () => { + it('invokes exportIssueModel without error using callback', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5794,35 +5922,28 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - ]; - client.innerApiCalls.listConversations = - stubSimpleCallWithCallback(expectedResponse); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.exportIssueModel = + stubLongRunningCallWithCallback(expectedResponse); const promise = new Promise((resolve, reject) => { - client.listConversations( + client.exportIssueModel( request, ( err?: Error | null, - result?: - | protos.google.cloud.contactcenterinsights.v1.IConversation[] - | null + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + > | null ) => { if (err) { reject(err); @@ -5832,19 +5953,23 @@ describe('v1.ContactCenterInsightsClient', () => { } ); }); - const response = await promise; + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IExportIssueModelMetadata + >; + const [response] = await operation.promise(); assert.deepStrictEqual(response, expectedResponse); const actualRequest = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.exportIssueModel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.exportIssueModel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversations with error', async () => { + it('invokes exportIssueModel with call error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5852,31 +5977,31 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', - ['parent'] + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; const expectedError = new Error('expected'); - client.innerApiCalls.listConversations = stubSimpleCall( + client.innerApiCalls.exportIssueModel = stubLongRunningCall( undefined, expectedError ); - await assert.rejects(client.listConversations(request), expectedError); + await assert.rejects(client.exportIssueModel(request), expectedError); const actualRequest = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.exportIssueModel as SinonStub ).getCall(0).args[0]; assert.deepStrictEqual(actualRequest, request); const actualHeaderRequestParams = ( - client.innerApiCalls.listConversations as SinonStub + client.innerApiCalls.exportIssueModel as SinonStub ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversationsStream without error', async () => { + it('invokes exportIssueModel with LRO error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, @@ -5884,71 +6009,688 @@ describe('v1.ContactCenterInsightsClient', () => { }); client.initialize(); const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + new protos.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest() ); const defaultValue1 = getTypeDefaultValue( - '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', - ['parent'] - ); - request.parent = defaultValue1; - const expectedHeaderRequestParams = `parent=${defaultValue1}`; - const expectedResponse = [ - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.Conversation() - ), - ]; - client.descriptors.page.listConversations.createStream = - stubPageStreamingCall(expectedResponse); - const stream = client.listConversationsStream(request); - const promise = new Promise((resolve, reject) => { - const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = - []; - stream.on( - 'data', - ( - response: protos.google.cloud.contactcenterinsights.v1.Conversation - ) => { - 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.listConversations.createStream as SinonStub) - .getCall(0) - .calledWith(client.innerApiCalls.listConversations, request) + '.google.cloud.contactcenterinsights.v1.ExportIssueModelRequest', + ['name'] ); - assert( - (client.descriptors.page.listConversations.createStream as SinonStub) - .getCall(0) - .args[2].otherArgs.headers[ - 'x-goog-request-params' - ].includes(expectedHeaderRequestParams) + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.exportIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError ); + const [operation] = await client.exportIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.exportIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); }); - it('invokes listConversationsStream with error', async () => { + it('invokes checkExportIssueModelProgress without error', async () => { const client = new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ credentials: {client_email: 'bogus', private_key: 'bogus'}, projectId: 'bogus', }); client.initialize(); - const request = generateSampleMessage( - new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + 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.checkExportIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkExportIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkExportIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('importIssueModel', () => { + it('invokes importIssueModel without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importIssueModel = + stubLongRunningCall(expectedResponse); + const [operation] = await client.importIssueModel(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importIssueModel without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.importIssueModel = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.importIssueModel( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelResponse, + protos.google.cloud.contactcenterinsights.v1.IImportIssueModelMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importIssueModel with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importIssueModel = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects(client.importIssueModel(request), expectedError); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes importIssueModel with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ImportIssueModelRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.importIssueModel = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.importIssueModel(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.importIssueModel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkImportIssueModelProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = await client.checkImportIssueModelProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkImportIssueModelProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkImportIssueModelProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('initializeEncryptionSpec', () => { + it('invokes initializeEncryptionSpec without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.initializeEncryptionSpec = + stubLongRunningCall(expectedResponse); + const [operation] = await client.initializeEncryptionSpec(request); + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeEncryptionSpec without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.longrunning.Operation() + ); + client.innerApiCalls.initializeEncryptionSpec = + stubLongRunningCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.initializeEncryptionSpec( + request, + ( + err?: Error | null, + result?: LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + > | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const operation = (await promise) as LROperation< + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecResponse, + protos.google.cloud.contactcenterinsights.v1.IInitializeEncryptionSpecMetadata + >; + const [response] = await operation.promise(); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeEncryptionSpec with call error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initializeEncryptionSpec = stubLongRunningCall( + undefined, + expectedError + ); + await assert.rejects( + client.initializeEncryptionSpec(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes initializeEncryptionSpec with LRO error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest() + ); + request.encryptionSpec ??= {}; + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.InitializeEncryptionSpecRequest', + ['encryptionSpec', 'name'] + ); + request.encryptionSpec.name = defaultValue1; + const expectedHeaderRequestParams = `encryption_spec.name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.initializeEncryptionSpec = stubLongRunningCall( + undefined, + undefined, + expectedError + ); + const [operation] = await client.initializeEncryptionSpec(request); + await assert.rejects(operation.promise(), expectedError); + const actualRequest = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.initializeEncryptionSpec as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes checkInitializeEncryptionSpecProgress without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedResponse = generateSampleMessage( + new operationsProtos.google.longrunning.Operation() + ); + expectedResponse.name = 'test'; + expectedResponse.response = {type_url: 'url', value: Buffer.from('')}; + expectedResponse.metadata = {type_url: 'url', value: Buffer.from('')}; + + client.operationsClient.getOperation = stubSimpleCall(expectedResponse); + const decodedOperation = + await client.checkInitializeEncryptionSpecProgress( + expectedResponse.name + ); + assert.deepStrictEqual(decodedOperation.name, expectedResponse.name); + assert(decodedOperation.metadata); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + + it('invokes checkInitializeEncryptionSpecProgress with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const expectedError = new Error('expected'); + + client.operationsClient.getOperation = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.checkInitializeEncryptionSpecProgress(''), + expectedError + ); + assert((client.operationsClient.getOperation as SinonStub).getCall(0)); + }); + }); + + describe('listConversations', () => { + it('invokes listConversations without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.innerApiCalls.listConversations = stubSimpleCall(expectedResponse); + const [response] = await client.listConversations(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations without error using callback', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.innerApiCalls.listConversations = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listConversations( + request, + ( + err?: Error | null, + result?: + | protos.google.cloud.contactcenterinsights.v1.IConversation[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversations with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listConversations = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.listConversations(request), expectedError); + const actualRequest = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listConversations as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listConversationsStream without error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.Conversation() + ), + ]; + client.descriptors.page.listConversations.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listConversationsStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.cloud.contactcenterinsights.v1.Conversation[] = + []; + stream.on( + 'data', + ( + response: protos.google.cloud.contactcenterinsights.v1.Conversation + ) => { + 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.listConversations.createStream as SinonStub) + .getCall(0) + .calledWith(client.innerApiCalls.listConversations, request) + ); + assert( + (client.descriptors.page.listConversations.createStream as SinonStub) + .getCall(0) + .args[2].otherArgs.headers[ + 'x-goog-request-params' + ].includes(expectedHeaderRequestParams) + ); + }); + + it('invokes listConversationsStream with error', async () => { + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + const request = generateSampleMessage( + new protos.google.cloud.contactcenterinsights.v1.ListConversationsRequest() ); const defaultValue1 = getTypeDefaultValue( '.google.cloud.contactcenterinsights.v1.ListConversationsRequest', @@ -7564,6 +8306,59 @@ describe('v1.ContactCenterInsightsClient', () => { }); }); + describe('encryptionSpec', () => { + const fakePath = '/rendered/path/encryptionSpec'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + }; + const client = + new contactcenterinsightsModule.v1.ContactCenterInsightsClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.encryptionSpecPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.encryptionSpecPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('encryptionSpecPath', () => { + const result = client.encryptionSpecPath( + 'projectValue', + 'locationValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.encryptionSpecPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromEncryptionSpecName', () => { + const result = client.matchProjectFromEncryptionSpecName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.encryptionSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromEncryptionSpecName', () => { + const result = client.matchLocationFromEncryptionSpecName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.encryptionSpecPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + describe('issue', () => { const fakePath = '/rendered/path/issue'; const expectedParameters = { From a2f2bc42c5b4a705febaf745cbf4b4056642cf26 Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:38:48 -0700 Subject: [PATCH 5/8] docs: [recaptchaenterprise] minor wording and branding adjustments (#5739) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * docs: minor wording and branding adjustments PiperOrigin-RevId: 683794297 Source-Link: https://github.com/googleapis/googleapis/commit/f5caeefcc0e3f5109bb29114dfe44fc458759fd9 Source-Link: https://github.com/googleapis/googleapis-gen/commit/a6cc971a29a19086dfdb9c93d954cbbee61038d9 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNsb3VkLXJlY2FwdGNoYWVudGVycHJpc2UvLk93bEJvdC55YW1sIiwiaCI6ImE2Y2M5NzFhMjlhMTkwODZkZmRiOWM5M2Q5NTRjYmJlZTYxMDM4ZDkifQ== * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot --- .../README.md | 4 ++-- .../v1beta1/recaptchaenterprise.proto | 24 +++++++++---------- .../protos/protos.json | 3 +++ ...se_service_v1_beta1.annotate_assessment.js | 4 ++-- ...rise_service_v1_beta1.create_assessment.js | 2 +- ...tcha_enterprise_service_v1_beta1_client.ts | 6 ++--- 6 files changed, 23 insertions(+), 20 deletions(-) diff --git a/packages/google-cloud-recaptchaenterprise/README.md b/packages/google-cloud-recaptchaenterprise/README.md index 7afd918f1b2..0e386a16530 100644 --- a/packages/google-cloud-recaptchaenterprise/README.md +++ b/packages/google-cloud-recaptchaenterprise/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Google Cloud reCAPTCHA Enterprise API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -209,4 +209,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [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=recaptchaenterprise.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto index 00286834482..974b8bd88bb 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto +++ b/packages/google-cloud-recaptchaenterprise/protos/google/cloud/recaptchaenterprise/v1beta1/recaptchaenterprise.proto @@ -60,7 +60,7 @@ service RecaptchaEnterpriseServiceV1Beta1 { // The create assessment request message. message CreateAssessmentRequest { - // Required. The name of the project in which the assessment will be created, + // Required. The name of the project in which the assessment is created, // in the format `projects/{project_number}`. string parent = 1 [ (google.api.field_behavior) = REQUIRED, @@ -290,8 +290,8 @@ message AnnotateAssessmentRequest { } ]; - // Optional. The annotation that will be assigned to the Event. This field can - // be left empty to provide reasons that apply to an event without concluding + // Optional. The annotation that is assigned to the Event. This field can be + // left empty to provide reasons that apply to an event without concluding // whether the event is legitimate or fraudulent. Annotation annotation = 2 [(google.api.field_behavior) = OPTIONAL]; @@ -419,12 +419,12 @@ message Event { DISABLED = 2; } - // Optional. The user response token provided by the reCAPTCHA Enterprise - // client-side integration on your site. + // Optional. The user response token provided by the reCAPTCHA client-side + // integration on your site. string token = 1 [(google.api.field_behavior) = OPTIONAL]; - // Optional. The site key that was used to invoke reCAPTCHA Enterprise on your - // site and generate the token. + // Optional. The site key that was used to invoke reCAPTCHA on your site and + // generate the token. string site_key = 2 [(google.api.field_behavior) = OPTIONAL]; // Optional. The user agent present in the request from the user's device @@ -437,7 +437,7 @@ message Event { // Optional. The expected action for this type of event. This should be the // same action provided at token generation time on client-side platforms - // already integrated with recaptcha enterprise. + // already integrated with reCAPTCHA. string expected_action = 5 [(google.api.field_behavior) = OPTIONAL]; // Optional. Unique stable hashed user identifier for the request. The @@ -445,7 +445,7 @@ message Event { bytes hashed_account_id = 6 [(google.api.field_behavior) = OPTIONAL]; // Optional. Data describing a payment transaction to be assessed. Sending - // this data enables reCAPTCHA Enterprise Fraud Prevention and the + // this data enables reCAPTCHA Fraud Prevention and the // FraudPreventionAssessment component in the response. TransactionData transaction_data = 13 [(google.api.field_behavior) = OPTIONAL]; @@ -455,7 +455,7 @@ message Event { [(google.api.field_behavior) = OPTIONAL]; } -// Transaction data associated with a payment protected by reCAPTCHA Enterprise. +// Transaction data associated with a payment protected by reCAPTCHA. message TransactionData { // Structured address format for billing and shipping addresses. message Address { @@ -531,11 +531,11 @@ message TransactionData { string gateway_response_code = 2; // AVS response code from the gateway - // (available only when reCAPTCHA Enterprise is called after authorization). + // (available only when reCAPTCHA is called after authorization). string avs_response_code = 3; // CVV response code from the gateway - // (available only when reCAPTCHA Enterprise is called after authorization). + // (available only when reCAPTCHA is called after authorization). string cvv_response_code = 4; } diff --git a/packages/google-cloud-recaptchaenterprise/protos/protos.json b/packages/google-cloud-recaptchaenterprise/protos/protos.json index c7853a1bdf1..9bf77087ed8 100644 --- a/packages/google-cloud-recaptchaenterprise/protos/protos.json +++ b/packages/google-cloud-recaptchaenterprise/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.annotate_assessment.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.annotate_assessment.js index 39047f28556..c06230d98a8 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.annotate_assessment.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.annotate_assessment.js @@ -34,8 +34,8 @@ function main(name) { */ // const name = 'abc123' /** - * Optional. The annotation that will be assigned to the Event. This field can - * be left empty to provide reasons that apply to an event without concluding + * Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding * whether the event is legitimate or fraudulent. */ // const annotation = {} diff --git a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_assessment.js b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_assessment.js index 4d249ab174a..3fd11fd3c25 100644 --- a/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_assessment.js +++ b/packages/google-cloud-recaptchaenterprise/samples/generated/v1beta1/recaptcha_enterprise_service_v1_beta1.create_assessment.js @@ -29,7 +29,7 @@ function main(parent, assessment) { * TODO(developer): Uncomment these variables before running the sample. */ /** - * Required. The name of the project in which the assessment will be created, + * Required. The name of the project in which the assessment is created, * in the format `projects/{project_number}`. */ // const parent = 'abc123' diff --git a/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts b/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts index 14dbdd842af..715e2b51993 100644 --- a/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts +++ b/packages/google-cloud-recaptchaenterprise/src/v1beta1/recaptcha_enterprise_service_v1_beta1_client.ts @@ -379,7 +379,7 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { * @param {Object} request * The request object that will be sent. * @param {string} request.parent - * Required. The name of the project in which the assessment will be created, + * Required. The name of the project in which the assessment is created, * in the format `projects/{project_number}`. * @param {google.cloud.recaptchaenterprise.v1beta1.Assessment} request.assessment * Required. The assessment details. @@ -482,8 +482,8 @@ export class RecaptchaEnterpriseServiceV1Beta1Client { * Required. The resource name of the Assessment, in the format * `projects/{project_number}/assessments/{assessment_id}`. * @param {google.cloud.recaptchaenterprise.v1beta1.AnnotateAssessmentRequest.Annotation} [request.annotation] - * Optional. The annotation that will be assigned to the Event. This field can - * be left empty to provide reasons that apply to an event without concluding + * Optional. The annotation that is assigned to the Event. This field can be + * left empty to provide reasons that apply to an event without concluding * whether the event is legitimate or fraudulent. * @param {number[]} [request.reasons] * Optional. Reasons for the annotation that are assigned to the event. From 38b46462a436347327f56c81ea3ae8dcbada1c14 Mon Sep 17 00:00:00 2001 From: "owlbot-bootstrapper[bot]" <104649659+owlbot-bootstrapper[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 01:00:41 +0000 Subject: [PATCH 6/8] feat: add initial files for google.marketingplatform.admin.v1alpha (#5716) Source-Link: https://togithub.com/googleapis/googleapis-gen/commit/1c58da100531d09e9123331d121f410e7d00e4aa Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLW1hcmtldGluZ3BsYXRmb3JtLWFkbWluLy5Pd2xCb3QueWFtbCIsImgiOiIxYzU4ZGExMDA1MzFkMDllOTEyMzMzMWQxMjFmNDEwZTdkMDBlNGFhIn0= PiperOrigin-RevId: 645451373 --- .../.OwlBot.yaml | 19 + .../.eslintignore | 7 + .../.eslintrc.json | 3 + .../.gitattributes | 4 + .../google-marketingplatform-admin/.gitignore | 14 + .../google-marketingplatform-admin/.jsdoc.js | 55 + .../.mocharc.js | 29 + .../google-marketingplatform-admin/.nycrc | 24 + .../.prettierignore | 6 + .../.prettierrc.js | 17 + .../.repo-metadata.json | 17 + .../CODE_OF_CONDUCT.md | 94 + .../CONTRIBUTING.md | 76 + .../google-marketingplatform-admin/LICENSE | 202 + .../google-marketingplatform-admin/README.md | 193 + .../package.json | 70 + .../v1alpha/marketingplatform_admin.proto | 216 + .../admin/v1alpha/resources.proto | 103 + .../protos/protos.d.ts | 7517 ++++++ .../protos/protos.js | 20455 ++++++++++++++++ .../protos/protos.json | 2103 ++ .../samples/README.md | 140 + ...n_service.create_analytics_account_link.js | 67 + ...n_service.delete_analytics_account_link.js | 63 + ...platform_admin_service.get_organization.js | 62 + ...in_service.list_analytics_account_links.js | 79 + ...dmin_service.set_property_service_level.js | 75 + ...oogle.marketingplatform.admin.v1alpha.json | 235 + .../samples/package.json | 24 + .../samples/quickstart.js | 78 + .../samples/test/quickstart.js | 44 + .../src/index.ts | 29 + .../src/v1alpha/gapic_metadata.json | 77 + .../src/v1alpha/index.ts | 19 + .../marketingplatform_admin_service_client.ts | 1150 + ...gplatform_admin_service_client_config.json | 64 + ...tingplatform_admin_service_proto_list.json | 4 + .../system-test/fixtures/sample/src/index.js | 27 + .../system-test/fixtures/sample/src/index.ts | 37 + .../system-test/install.ts | 51 + ...marketingplatform_admin_service_v1alpha.ts | 1465 ++ .../tsconfig.json | 19 + .../webpack.config.js | 64 + release-please-config.json | 1 + 44 files changed, 35098 insertions(+) create mode 100644 packages/google-marketingplatform-admin/.OwlBot.yaml create mode 100644 packages/google-marketingplatform-admin/.eslintignore create mode 100644 packages/google-marketingplatform-admin/.eslintrc.json create mode 100644 packages/google-marketingplatform-admin/.gitattributes create mode 100644 packages/google-marketingplatform-admin/.gitignore create mode 100644 packages/google-marketingplatform-admin/.jsdoc.js create mode 100644 packages/google-marketingplatform-admin/.mocharc.js create mode 100644 packages/google-marketingplatform-admin/.nycrc create mode 100644 packages/google-marketingplatform-admin/.prettierignore create mode 100644 packages/google-marketingplatform-admin/.prettierrc.js create mode 100644 packages/google-marketingplatform-admin/.repo-metadata.json create mode 100644 packages/google-marketingplatform-admin/CODE_OF_CONDUCT.md create mode 100644 packages/google-marketingplatform-admin/CONTRIBUTING.md create mode 100644 packages/google-marketingplatform-admin/LICENSE create mode 100644 packages/google-marketingplatform-admin/README.md create mode 100644 packages/google-marketingplatform-admin/package.json create mode 100644 packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto create mode 100644 packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/resources.proto create mode 100644 packages/google-marketingplatform-admin/protos/protos.d.ts create mode 100644 packages/google-marketingplatform-admin/protos/protos.js create mode 100644 packages/google-marketingplatform-admin/protos/protos.json create mode 100644 packages/google-marketingplatform-admin/samples/README.md create mode 100644 packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js create mode 100644 packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js create mode 100644 packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js create mode 100644 packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js create mode 100644 packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js create mode 100644 packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json create mode 100644 packages/google-marketingplatform-admin/samples/package.json create mode 100644 packages/google-marketingplatform-admin/samples/quickstart.js create mode 100644 packages/google-marketingplatform-admin/samples/test/quickstart.js create mode 100644 packages/google-marketingplatform-admin/src/index.ts create mode 100644 packages/google-marketingplatform-admin/src/v1alpha/gapic_metadata.json create mode 100644 packages/google-marketingplatform-admin/src/v1alpha/index.ts create mode 100644 packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts create mode 100644 packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client_config.json create mode 100644 packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_proto_list.json create mode 100644 packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.js create mode 100644 packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.ts create mode 100644 packages/google-marketingplatform-admin/system-test/install.ts create mode 100644 packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts create mode 100644 packages/google-marketingplatform-admin/tsconfig.json create mode 100644 packages/google-marketingplatform-admin/webpack.config.js diff --git a/packages/google-marketingplatform-admin/.OwlBot.yaml b/packages/google-marketingplatform-admin/.OwlBot.yaml new file mode 100644 index 00000000000..448eedb8c82 --- /dev/null +++ b/packages/google-marketingplatform-admin/.OwlBot.yaml @@ -0,0 +1,19 @@ +# Copyright 2022 Google LLC +# +# Licensed under the Apache License, Version 2.0 (the "License"); +# you may not use this file except in compliance with the License. +# You may obtain a copy of the License at +# +# http://www.apache.org/licenses/LICENSE-2.0 +# +# Unless required by applicable law or agreed to in writing, software +# distributed under the License is distributed on an "AS IS" BASIS, +# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# See the License for the specific language governing permissions and +# limitations under the License. + +deep-copy-regex: + - source: /google/marketingplatform/admin/(.*)/.*-nodejs + dest: /owl-bot-staging/google-marketingplatform-admin/$1 + +api-name: marketingplatformadminapi \ No newline at end of file diff --git a/packages/google-marketingplatform-admin/.eslintignore b/packages/google-marketingplatform-admin/.eslintignore new file mode 100644 index 00000000000..ea5b04aebe6 --- /dev/null +++ b/packages/google-marketingplatform-admin/.eslintignore @@ -0,0 +1,7 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ +samples/generated/ diff --git a/packages/google-marketingplatform-admin/.eslintrc.json b/packages/google-marketingplatform-admin/.eslintrc.json new file mode 100644 index 00000000000..78215349546 --- /dev/null +++ b/packages/google-marketingplatform-admin/.eslintrc.json @@ -0,0 +1,3 @@ +{ + "extends": "./node_modules/gts" +} diff --git a/packages/google-marketingplatform-admin/.gitattributes b/packages/google-marketingplatform-admin/.gitattributes new file mode 100644 index 00000000000..33739cb74e4 --- /dev/null +++ b/packages/google-marketingplatform-admin/.gitattributes @@ -0,0 +1,4 @@ +*.ts text eol=lf +*.js text eol=lf +protos/* linguist-generated +**/api-extractor.json linguist-language=JSON-with-Comments diff --git a/packages/google-marketingplatform-admin/.gitignore b/packages/google-marketingplatform-admin/.gitignore new file mode 100644 index 00000000000..d4f03a0df2e --- /dev/null +++ b/packages/google-marketingplatform-admin/.gitignore @@ -0,0 +1,14 @@ +**/*.log +**/node_modules +/.coverage +/coverage +/.nyc_output +/docs/ +/out/ +/build/ +system-test/secrets.js +system-test/*key.json +*.lock +.DS_Store +package-lock.json +__pycache__ diff --git a/packages/google-marketingplatform-admin/.jsdoc.js b/packages/google-marketingplatform-admin/.jsdoc.js new file mode 100644 index 00000000000..c2e588bb7a0 --- /dev/null +++ b/packages/google-marketingplatform-admin/.jsdoc.js @@ -0,0 +1,55 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file 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 2024 Google LLC', + includeDate: false, + sourceFiles: false, + systemName: '@google-ads/marketing-platform-admin', + theme: 'lumen', + default: { + outputSourceFiles: false + } + }, + markdown: { + idInHeadings: true + } +}; diff --git a/packages/google-marketingplatform-admin/.mocharc.js b/packages/google-marketingplatform-admin/.mocharc.js new file mode 100644 index 00000000000..7e843ab5a75 --- /dev/null +++ b/packages/google-marketingplatform-admin/.mocharc.js @@ -0,0 +1,29 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +const config = { + "enable-source-maps": true, + "throw-deprecation": true, + "timeout": 10000, + "recursive": true +} +if (process.env.MOCHA_THROW_DEPRECATION === 'false') { + delete config['throw-deprecation']; +} +if (process.env.MOCHA_REPORTER) { + config.reporter = process.env.MOCHA_REPORTER; +} +if (process.env.MOCHA_REPORTER_OUTPUT) { + config['reporter-option'] = `output=${process.env.MOCHA_REPORTER_OUTPUT}`; +} +module.exports = config diff --git a/packages/google-marketingplatform-admin/.nycrc b/packages/google-marketingplatform-admin/.nycrc new file mode 100644 index 00000000000..b18d5472b62 --- /dev/null +++ b/packages/google-marketingplatform-admin/.nycrc @@ -0,0 +1,24 @@ +{ + "report-dir": "./.coverage", + "reporter": ["text", "lcov"], + "exclude": [ + "**/*-test", + "**/.coverage", + "**/apis", + "**/benchmark", + "**/conformance", + "**/docs", + "**/samples", + "**/scripts", + "**/protos", + "**/test", + "**/*.d.ts", + ".jsdoc.js", + "**/.jsdoc.js", + "karma.conf.js", + "webpack-tests.config.js", + "webpack.config.js" + ], + "exclude-after-remap": false, + "all": true +} diff --git a/packages/google-marketingplatform-admin/.prettierignore b/packages/google-marketingplatform-admin/.prettierignore new file mode 100644 index 00000000000..9340ad9b86d --- /dev/null +++ b/packages/google-marketingplatform-admin/.prettierignore @@ -0,0 +1,6 @@ +**/node_modules +**/coverage +test/fixtures +build/ +docs/ +protos/ diff --git a/packages/google-marketingplatform-admin/.prettierrc.js b/packages/google-marketingplatform-admin/.prettierrc.js new file mode 100644 index 00000000000..120c6aa3e6e --- /dev/null +++ b/packages/google-marketingplatform-admin/.prettierrc.js @@ -0,0 +1,17 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +module.exports = { + ...require('gts/.prettierrc.json') +} diff --git a/packages/google-marketingplatform-admin/.repo-metadata.json b/packages/google-marketingplatform-admin/.repo-metadata.json new file mode 100644 index 00000000000..b77300281c2 --- /dev/null +++ b/packages/google-marketingplatform-admin/.repo-metadata.json @@ -0,0 +1,17 @@ +{ + "name": "marketingplatformadminapi", + "name_pretty": "Google Marketing Platform Admin API", + "product_documentation": "https://developers.google.com/analytics/devguides/config/gmp/v1", + "client_documentation": "https://cloud.google.com/nodejs/docs/reference/marketingplatformadminapi/latest", + "issue_tracker": "https://github.com/googleapis/google-cloud-node/issues", + "release_level": "preview", + "language": "nodejs", + "repo": "googleapis/google-cloud-node", + "distribution_name": "@google-ads/marketing-platform-admin", + "api_id": "marketingplatformadmin.googleapis.com", + "default_version": "v1alpha", + "requires_billing": true, + "library_type": "GAPIC_AUTO", + "api_shortname": "marketingplatformadminapi" +} + diff --git a/packages/google-marketingplatform-admin/CODE_OF_CONDUCT.md b/packages/google-marketingplatform-admin/CODE_OF_CONDUCT.md new file mode 100644 index 00000000000..2add2547a81 --- /dev/null +++ b/packages/google-marketingplatform-admin/CODE_OF_CONDUCT.md @@ -0,0 +1,94 @@ + +# Code of Conduct + +## Our Pledge + +In the interest of fostering an open and welcoming environment, we as +contributors and maintainers pledge to making participation in our project and +our community a harassment-free experience for everyone, regardless of age, body +size, disability, ethnicity, gender identity and expression, level of +experience, education, socio-economic status, nationality, personal appearance, +race, religion, or sexual identity and orientation. + +## Our Standards + +Examples of behavior that contributes to creating a positive environment +include: + +* Using welcoming and inclusive language +* Being respectful of differing viewpoints and experiences +* Gracefully accepting constructive criticism +* Focusing on what is best for the community +* Showing empathy towards other community members + +Examples of unacceptable behavior by participants include: + +* The use of sexualized language or imagery and unwelcome sexual attention or + advances +* Trolling, insulting/derogatory comments, and personal or political attacks +* Public or private harassment +* Publishing others' private information, such as a physical or electronic + address, without explicit permission +* Other conduct which could reasonably be considered inappropriate in a + professional setting + +## Our Responsibilities + +Project maintainers are responsible for clarifying the standards of acceptable +behavior and are expected to take appropriate and fair corrective action in +response to any instances of unacceptable behavior. + +Project maintainers have the right and responsibility to remove, edit, or reject +comments, commits, code, wiki edits, issues, and other contributions that are +not aligned to this Code of Conduct, or to ban temporarily or permanently any +contributor for other behaviors that they deem inappropriate, threatening, +offensive, or harmful. + +## Scope + +This Code of Conduct applies both within project spaces and in public spaces +when an individual is representing the project or its community. Examples of +representing a project or community include using an official project e-mail +address, posting via an official social media account, or acting as an appointed +representative at an online or offline event. Representation of a project may be +further defined and clarified by project maintainers. + +This Code of Conduct also applies outside the project spaces when the Project +Steward has a reasonable belief that an individual's behavior may have a +negative impact on the project or its community. + +## Conflict Resolution + +We do not believe that all conflict is bad; healthy debate and disagreement +often yield positive results. However, it is never okay to be disrespectful or +to engage in behavior that violates the project’s code of conduct. + +If you see someone violating the code of conduct, you are encouraged to address +the behavior directly with those involved. Many issues can be resolved quickly +and easily, and this gives people more control over the outcome of their +dispute. If you are unable to resolve the matter for any reason, or if the +behavior is threatening or harassing, report it. We are dedicated to providing +an environment where participants feel welcome and safe. + +Reports should be directed to *googleapis-stewards@google.com*, the +Project Steward(s) for *Google Cloud Client Libraries*. It is the Project Steward’s duty to +receive and address reported violations of the code of conduct. They will then +work with a committee consisting of representatives from the Open Source +Programs Office and the Google Open Source Strategy team. If for any reason you +are uncomfortable reaching out to the Project Steward, please email +opensource@google.com. + +We will investigate every complaint, but you may not receive a direct response. +We will use our discretion in determining when and how to follow up on reported +incidents, which may range from not taking action to permanent expulsion from +the project and project-sponsored spaces. We will notify the accused of the +report and provide them an opportunity to discuss it before any action is taken. +The identity of the reporter will be omitted from the details of the report +supplied to the accused. In potentially harmful situations, such as ongoing +harassment or threats to anyone's safety, we may take action without notice. + +## Attribution + +This Code of Conduct is adapted from the Contributor Covenant, version 1.4, +available at +https://www.contributor-covenant.org/version/1/4/code-of-conduct.html \ No newline at end of file diff --git a/packages/google-marketingplatform-admin/CONTRIBUTING.md b/packages/google-marketingplatform-admin/CONTRIBUTING.md new file mode 100644 index 00000000000..7e691cb84c9 --- /dev/null +++ b/packages/google-marketingplatform-admin/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 Google Marketing Platform Admin API 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=marketingplatformadmin.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/getting-started \ No newline at end of file diff --git a/packages/google-marketingplatform-admin/LICENSE b/packages/google-marketingplatform-admin/LICENSE new file mode 100644 index 00000000000..d6456956733 --- /dev/null +++ b/packages/google-marketingplatform-admin/LICENSE @@ -0,0 +1,202 @@ + + Apache License + Version 2.0, January 2004 + http://www.apache.org/licenses/ + + TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION + + 1. Definitions. + + "License" shall mean the terms and conditions for use, reproduction, + and distribution as defined by Sections 1 through 9 of this document. + + "Licensor" shall mean the copyright owner or entity authorized by + the copyright owner that is granting the License. + + "Legal Entity" shall mean the union of the acting entity and all + other entities that control, are controlled by, or are under common + control with that entity. For the purposes of this definition, + "control" means (i) the power, direct or indirect, to cause the + direction or management of such entity, whether by contract or + otherwise, or (ii) ownership of fifty percent (50%) or more of the + outstanding shares, or (iii) beneficial ownership of such entity. + + "You" (or "Your") shall mean an individual or Legal Entity + exercising permissions granted by this License. + + "Source" form shall mean the preferred form for making modifications, + including but not limited to software source code, documentation + source, and configuration files. + + "Object" form shall mean any form resulting from mechanical + transformation or translation of a Source form, including but + not limited to compiled object code, generated documentation, + and conversions to other media types. + + "Work" shall mean the work of authorship, whether in Source or + Object form, made available under the License, as indicated by a + copyright notice that is included in or attached to the work + (an example is provided in the Appendix below). + + "Derivative Works" shall mean any work, whether in Source or Object + form, that is based on (or derived from) the Work and for which the + editorial revisions, annotations, elaborations, or other modifications + represent, as a whole, an original work of authorship. For the purposes + of this License, Derivative Works shall not include works that remain + separable from, or merely link (or bind by name) to the interfaces of, + the Work and Derivative Works thereof. + + "Contribution" shall mean any work of authorship, including + the original version of the Work and any modifications or additions + to that Work or Derivative Works thereof, that is intentionally + submitted to Licensor for inclusion in the Work by the copyright owner + or by an individual or Legal Entity authorized to submit on behalf of + the copyright owner. For the purposes of this definition, "submitted" + means any form of electronic, verbal, or written communication sent + to the Licensor or its representatives, including but not limited to + communication on electronic mailing lists, source code control systems, + and issue tracking systems that are managed by, or on behalf of, the + Licensor for the purpose of discussing and improving the Work, but + excluding communication that is conspicuously marked or otherwise + designated in writing by the copyright owner as "Not a Contribution." + + "Contributor" shall mean Licensor and any individual or Legal Entity + on behalf of whom a Contribution has been received by Licensor and + subsequently incorporated within the Work. + + 2. Grant of Copyright License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + copyright license to reproduce, prepare Derivative Works of, + publicly display, publicly perform, sublicense, and distribute the + Work and such Derivative Works in Source or Object form. + + 3. Grant of Patent License. Subject to the terms and conditions of + this License, each Contributor hereby grants to You a perpetual, + worldwide, non-exclusive, no-charge, royalty-free, irrevocable + (except as stated in this section) patent license to make, have made, + use, offer to sell, sell, import, and otherwise transfer the Work, + where such license applies only to those patent claims licensable + by such Contributor that are necessarily infringed by their + Contribution(s) alone or by combination of their Contribution(s) + with the Work to which such Contribution(s) was submitted. If You + institute patent litigation against any entity (including a + cross-claim or counterclaim in a lawsuit) alleging that the Work + or a Contribution incorporated within the Work constitutes direct + or contributory patent infringement, then any patent licenses + granted to You under this License for that Work shall terminate + as of the date such litigation is filed. + + 4. Redistribution. You may reproduce and distribute copies of the + Work or Derivative Works thereof in any medium, with or without + modifications, and in Source or Object form, provided that You + meet the following conditions: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) You must retain, in the Source form of any Derivative Works + that You distribute, all copyright, patent, trademark, and + attribution notices from the Source form of the Work, + excluding those notices that do not pertain to any part of + the Derivative Works; and + + (d) If the Work includes a "NOTICE" text file as part of its + distribution, then any Derivative Works that You distribute must + include a readable copy of the attribution notices contained + within such NOTICE file, excluding those notices that do not + pertain to any part of the Derivative Works, in at least one + of the following places: within a NOTICE text file distributed + as part of the Derivative Works; within the Source form or + documentation, if provided along with the Derivative Works; or, + within a display generated by the Derivative Works, if and + wherever such third-party notices normally appear. The contents + of the NOTICE file are for informational purposes only and + do not modify the License. You may add Your own attribution + notices within Derivative Works that You distribute, alongside + or as an addendum to the NOTICE text from the Work, provided + that such additional attribution notices cannot be construed + as modifying the License. + + You may add Your own copyright statement to Your modifications and + may provide additional or different license terms and conditions + for use, reproduction, or distribution of Your modifications, or + for any such Derivative Works as a whole, provided Your use, + reproduction, and distribution of the Work otherwise complies with + the conditions stated in this License. + + 5. Submission of Contributions. Unless You explicitly state otherwise, + any Contribution intentionally submitted for inclusion in the Work + by You to the Licensor shall be under the terms and conditions of + this License, without any additional terms or conditions. + Notwithstanding the above, nothing herein shall supersede or modify + the terms of any separate license agreement you may have executed + with Licensor regarding such Contributions. + + 6. Trademarks. This License does not grant permission to use the trade + names, trademarks, service marks, or product names of the Licensor, + except as required for reasonable and customary use in describing the + origin of the Work and reproducing the content of the NOTICE file. + + 7. Disclaimer of Warranty. Unless required by applicable law or + agreed to in writing, Licensor provides the Work (and each + Contributor provides its Contributions) on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or + implied, including, without limitation, any warranties or conditions + of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A + PARTICULAR PURPOSE. You are solely responsible for determining the + appropriateness of using or redistributing the Work and assume any + risks associated with Your exercise of permissions under this License. + + 8. Limitation of Liability. In no event and under no legal theory, + whether in tort (including negligence), contract, or otherwise, + unless required by applicable law (such as deliberate and grossly + negligent acts) or agreed to in writing, shall any Contributor be + liable to You for damages, including any direct, indirect, special, + incidental, or consequential damages of any character arising as a + result of this License or out of the use or inability to use the + Work (including but not limited to damages for loss of goodwill, + work stoppage, computer failure or malfunction, or any and all + other commercial damages or losses), even if such Contributor + has been advised of the possibility of such damages. + + 9. Accepting Warranty or Additional Liability. While redistributing + the Work or Derivative Works thereof, You may choose to offer, + and charge a fee for, acceptance of support, warranty, indemnity, + or other liability obligations and/or rights consistent with this + License. However, in accepting such obligations, You may act only + on Your own behalf and on Your sole responsibility, not on behalf + of any other Contributor, and only if You agree to indemnify, + defend, and hold each Contributor harmless for any liability + incurred by, or claims asserted against, such Contributor by reason + of your accepting any such warranty or additional liability. + + END OF TERMS AND CONDITIONS + + APPENDIX: How to apply the Apache License to your work. + + To apply the Apache License to your work, attach the following + boilerplate notice, with the fields enclosed by brackets "[]" + replaced with your own identifying information. (Don't include + the brackets!) The text should be enclosed in the appropriate + comment syntax for the file format. We also recommend that a + file or class name and description of purpose be included on the + same "printed page" as the copyright notice for easier + identification within third-party archives. + + Copyright [yyyy] [name of copyright owner] + + Licensed under the Apache License, Version 2.0 (the "License"); + you may not use this file except in compliance with the License. + You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. diff --git a/packages/google-marketingplatform-admin/README.md b/packages/google-marketingplatform-admin/README.md new file mode 100644 index 00000000000..156b3b78a11 --- /dev/null +++ b/packages/google-marketingplatform-admin/README.md @@ -0,0 +1,193 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Marketing Platform Admin API: Node.js Client](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-marketingplatform-admin) + +[![release level](https://img.shields.io/badge/release%20level-preview-yellow.svg?style=flat)](https://cloud.google.com/terms/launch-stages) +[![npm version](https://img.shields.io/npm/v/@google-ads/marketing-platform-admin.svg)](https://www.npmjs.org/package/@google-ads/marketing-platform-admin) + + + + +Google Marketing Platform Admin API client for Node.js + + +A comprehensive list of changes in each version may be found in +[the CHANGELOG](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-marketingplatform-admin/CHANGELOG.md). + +* [Google Marketing Platform Admin API Node.js Client API Reference][client-docs] +* [Google Marketing Platform Admin API Documentation][product-docs] +* [github.com/googleapis/google-cloud-node/packages/google-marketingplatform-admin](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-marketingplatform-admin) + +Read more about the client libraries for Cloud APIs, including the older +Google APIs Client Libraries, in [Client Libraries Explained][explained]. + +[explained]: https://cloud.google.com/apis/docs/client-libraries-explained + +**Table of contents:** + + +* [Quickstart](#quickstart) + * [Before you begin](#before-you-begin) + * [Installing the client library](#installing-the-client-library) + * [Using the client library](#using-the-client-library) +* [Samples](#samples) +* [Versioning](#versioning) +* [Contributing](#contributing) +* [License](#license) + +## Quickstart + +### Before you begin + +1. [Select or create a Cloud Platform project][projects]. +1. [Enable billing for your project][billing]. +1. [Enable the Google Marketing Platform Admin API API][enable_api]. +1. [Set up authentication][auth] so you can access the + API from your local workstation. + +### Installing the client library + +```bash +npm install @google-ads/marketing-platform-admin +``` + + +### Using the client library + +```javascript +/** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + */ +// const parent = 'abc123' +/** + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ +// const pageSize = 1234 +/** + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + */ +// const pageToken = 'abc123' + +// Imports the Admin library +const {MarketingplatformAdminServiceClient} = + require('@google-ads/marketing-platform-admin').v1alpha; + +// Instantiates a client +const adminClient = new MarketingplatformAdminServiceClient({fallback: true}); + +async function callListAnalyticsAccountLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listAnalyticsAccountLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } +} + +callListAnalyticsAccountLinks(); + +``` + + + +## Samples + +Samples are in the [`samples/`](https://github.com/googleapis/google-cloud-node/tree/main/packages/google-marketingplatform-admin/samples) directory. Each sample's `README.md` has instructions for running its sample. + +| Sample | Source Code | Try it | +| --------------------------- | --------------------------------- | ------ | +| Marketingplatform_admin_service.create_analytics_account_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js,packages/google-marketingplatform-admin/samples/README.md) | +| Marketingplatform_admin_service.delete_analytics_account_link | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js,packages/google-marketingplatform-admin/samples/README.md) | +| Marketingplatform_admin_service.get_organization | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js,packages/google-marketingplatform-admin/samples/README.md) | +| Marketingplatform_admin_service.list_analytics_account_links | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js,packages/google-marketingplatform-admin/samples/README.md) | +| Marketingplatform_admin_service.set_property_service_level | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js,packages/google-marketingplatform-admin/samples/README.md) | +| Quickstart | [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/quickstart.js) | [![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/quickstart.js,packages/google-marketingplatform-admin/samples/README.md) | + + + +The [Google Marketing Platform Admin API Node.js Client API Reference][client-docs] documentation +also contains samples. + +## Supported Node.js Versions + +Our client libraries follow the [Node.js release schedule](https://github.com/nodejs/release#release-schedule). +Libraries are compatible with all current _active_ and _maintenance_ versions of +Node.js. +If you are using an end-of-life version of Node.js, we recommend that you update +as soon as possible to an actively supported LTS version. + +Google's client libraries support legacy versions of Node.js runtimes on a +best-efforts basis with the following warnings: + +* Legacy versions are not tested in continuous integration. +* Some security patches and features cannot be backported. +* Dependencies cannot be kept up-to-date. + +Client libraries targeting some end-of-life versions of Node.js are available, and +can be installed through npm [dist-tags](https://docs.npmjs.com/cli/dist-tag). +The dist-tags follow the naming convention `legacy-(version)`. +For example, `npm install @google-ads/marketing-platform-admin@legacy-8` installs client libraries +for versions compatible with Node.js 8. + +## Versioning + +This library follows [Semantic Versioning](http://semver.org/). + + + + + + + +This library is considered to be in **preview**. This means it is still a +work-in-progress and under active development. Any release is subject to +backwards-incompatible changes at any time. + + +More Information: [Google Cloud Platform Launch Stages][launch_stages] + +[launch_stages]: https://cloud.google.com/terms/launch-stages + +## Contributing + +Contributions welcome! See the [Contributing Guide](https://github.com/googleapis/google-cloud-node/blob/main/CONTRIBUTING.md). + +Please note that this `README.md`, the `samples/README.md`, +and a variety of configuration files in this repository (including `.nycrc` and `tsconfig.json`) +are generated from a central template. To edit one of these files, make an edit +to its templates in +[directory](https://github.com/googleapis/synthtool). + +## License + +Apache Version 2.0 + +See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) + +[client-docs]: https://cloud.google.com/nodejs/docs/reference/marketingplatformadminapi/latest +[product-docs]: https://developers.google.com/analytics/devguides/config/gmp/v1 +[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=marketingplatformadmin.googleapis.com +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-marketingplatform-admin/package.json b/packages/google-marketingplatform-admin/package.json new file mode 100644 index 00000000000..1c9a21102be --- /dev/null +++ b/packages/google-marketingplatform-admin/package.json @@ -0,0 +1,70 @@ +{ + "name": "@google-ads/marketing-platform-admin", + "version": "0.0.0", + "description": "Google Marketing Platform Admin API client for Node.js", + "repository": { + "type": "git", + "url": "https://github.com/googleapis/google-cloud-node.git", + "directory": "packages/google-marketingplatform-admin" + }, + "license": "Apache-2.0", + "author": "Google LLC", + "main": "build/src/index.js", + "files": [ + "build/src", + "build/protos" + ], + "homepage": "https://github.com/googleapis/google-cloud-node/tree/main/packages/google-marketingplatform-admin", + "keywords": [ + "google apis client", + "google api client", + "google apis", + "google api", + "google", + "google cloud platform", + "google cloud", + "cloud", + "google marketingplatformadminapi", + "marketingplatformadminapi", + "Google Marketing Platform Admin API" + ], + "scripts": { + "clean": "gts clean", + "compile": "tsc -p . && cp -r protos build/", + "compile-protos": "compileProtos src", + "docs": "jsdoc -c .jsdoc.js", + "predocs-test": "npm run docs", + "docs-test": "linkinator docs", + "fix": "gts fix", + "lint": "gts check", + "postpack": "minifyProtoJson", + "prepare": "npm run compile", + "system-test": "c8 mocha build/system-test", + "test": "c8 mocha build/test", + "samples-test": "cd samples/ && npm link ../ && npm i && npm test", + "prelint": "cd samples; npm link ../; npm i" + }, + "dependencies": { + "google-gax": "^4.0.3" + }, + "devDependencies": { + "@types/mocha": "^9.0.0", + "@types/node": "^20.4.5", + "@types/sinon": "^17.0.0", + "c8": "^9.0.0", + "gapic-tools": "^0.4.0", + "gts": "^5.0.0", + "jsdoc": "^4.0.0", + "jsdoc-fresh": "^3.0.0", + "jsdoc-region-tag": "^3.0.0", + "linkinator": "4.1.2", + "long": "^5.2.3", + "mocha": "^9.2.2", + "pack-n-play": "^2.0.0", + "sinon": "^18.0.0", + "typescript": "^5.1.6" + }, + "engines": { + "node": ">=14.0.0" + } +} diff --git a/packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto b/packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto new file mode 100644 index 00000000000..11c5497a573 --- /dev/null +++ b/packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto @@ -0,0 +1,216 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.marketingplatform.admin.v1alpha; + +import "google/api/annotations.proto"; +import "google/api/client.proto"; +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; +import "google/marketingplatform/admin/v1alpha/resources.proto"; +import "google/protobuf/empty.proto"; + +option csharp_namespace = "Google.Ads.MarketingPlatform.Admin.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;admin"; +option java_multiple_files = true; +option java_outer_classname = "MarketingplatformAdminProto"; +option java_package = "com.google.ads.marketingplatform.admin.v1alpha"; +option php_namespace = "Google\\Ads\\MarketingPlatform\\Admin\\V1alpha"; +option ruby_package = "Google::Ads::MarketingPlatform::Admin::V1alpha"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Property" + pattern: "properties/{property}" +}; + +// Service Interface for the Google Marketing Platform Admin API. +service MarketingplatformAdminService { + option (google.api.default_host) = "marketingplatformadmin.googleapis.com"; + option (google.api.oauth_scopes) = + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read," + "https://www.googleapis.com/auth/marketingplatformadmin.analytics.update"; + + // Lookup for a single organization. + rpc GetOrganization(GetOrganizationRequest) returns (Organization) { + option (google.api.http) = { + get: "/v1alpha/{name=organizations/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Lists the Google Analytics accounts link to the specified Google Marketing + // Platform organization. + rpc ListAnalyticsAccountLinks(ListAnalyticsAccountLinksRequest) + returns (ListAnalyticsAccountLinksResponse) { + option (google.api.http) = { + get: "/v1alpha/{parent=organizations/*}/analyticsAccountLinks" + }; + option (google.api.method_signature) = "parent"; + } + + // Creates the link between the Analytics account and the Google Marketing + // Platform organization. + // + // User needs to be an org user, and admin on the Analytics account to create + // the link. If the account is already linked to an organization, user needs + // to unlink the account from the current organization, then try link again. + rpc CreateAnalyticsAccountLink(CreateAnalyticsAccountLinkRequest) + returns (AnalyticsAccountLink) { + option (google.api.http) = { + post: "/v1alpha/{parent=organizations/*}/analyticsAccountLinks" + body: "analytics_account_link" + }; + option (google.api.method_signature) = "parent,analytics_account_link"; + } + + // Deletes the AnalyticsAccountLink, which detaches the Analytics account from + // the Google Marketing Platform organization. + // + // User needs to be an org user, and admin on the Analytics account in order + // to delete the link. + rpc DeleteAnalyticsAccountLink(DeleteAnalyticsAccountLinkRequest) + returns (google.protobuf.Empty) { + option (google.api.http) = { + delete: "/v1alpha/{name=organizations/*/analyticsAccountLinks/*}" + }; + option (google.api.method_signature) = "name"; + } + + // Updates the service level for an Analytics property. + rpc SetPropertyServiceLevel(SetPropertyServiceLevelRequest) + returns (SetPropertyServiceLevelResponse) { + option (google.api.http) = { + post: "/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel" + body: "*" + }; + option (google.api.method_signature) = "analytics_account_link"; + } +} + +// Various levels of service for Google Analytics. +enum AnalyticsServiceLevel { + // Service level unspecified. + ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0; + + // The standard version of Google Analytics. + ANALYTICS_SERVICE_LEVEL_STANDARD = 1; + + // The premium version of Google Analytics. + ANALYTICS_SERVICE_LEVEL_360 = 2; +} + +// Request message for GetOrganization RPC. +message GetOrganizationRequest { + // Required. The name of the Organization to retrieve. + // Format: organizations/{org_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/Organization" + } + ]; +} + +// Request message for ListAnalyticsAccountLinks RPC. +message ListAnalyticsAccountLinksRequest { + // Required. The parent organization, which owns this collection of Analytics + // account links. Format: organizations/{org_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + } + ]; + + // Optional. The maximum number of Analytics account links to return in one + // call. The service may return fewer than this value. + // + // If unspecified, at most 50 Analytics account links will be returned. The + // maximum value is 1000; values above 1000 will be coerced to 1000. + int32 page_size = 2 [(google.api.field_behavior) = OPTIONAL]; + + // Optional. A page token, received from a previous ListAnalyticsAccountLinks + // call. Provide this to retrieve the subsequent page. + // + // When paginating, all other parameters provided to + // `ListAnalyticsAccountLinks` must match the call that provided the page + // token. + string page_token = 3 [(google.api.field_behavior) = OPTIONAL]; +} + +// Response message for ListAnalyticsAccountLinks RPC. +message ListAnalyticsAccountLinksResponse { + // Analytics account links in this organization. + repeated AnalyticsAccountLink analytics_account_links = 1; + + // A token, which can be sent as `page_token` to retrieve the next page. + // If this field is omitted, there are no subsequent pages. + string next_page_token = 2; +} + +// Request message for CreateAnalyticsAccountLink RPC. +message CreateAnalyticsAccountLinkRequest { + // Required. The parent resource where this Analytics account link will be + // created. Format: organizations/{org_id} + string parent = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + child_type: "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + } + ]; + + // Required. The Analytics account link to create. + AnalyticsAccountLink analytics_account_link = 2 + [(google.api.field_behavior) = REQUIRED]; +} + +// Request message for DeleteAnalyticsAccountLink RPC. +message DeleteAnalyticsAccountLinkRequest { + // Required. The name of the Analytics account link to delete. + // Format: + // organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + string name = 1 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + } + ]; +} + +// Request message for SetPropertyServiceLevel RPC. +message SetPropertyServiceLevelRequest { + // Required. The parent AnalyticsAccountLink scope where this property is in. + // Format: + // organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + string analytics_account_link = 1 [(google.api.field_behavior) = REQUIRED]; + + // Required. The Analytics property to change the ServiceLevel setting. This + // field is the name of the Google Analytics Admin API property resource. + // + // Format: analyticsadmin.googleapis.com/properties/{property_id} + string analytics_property = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Property" + } + ]; + + // Required. The service level to set for this property. + AnalyticsServiceLevel service_level = 3 + [(google.api.field_behavior) = REQUIRED]; +} + +// Response message for SetPropertyServiceLevel RPC. +message SetPropertyServiceLevelResponse {} diff --git a/packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/resources.proto b/packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/resources.proto new file mode 100644 index 00000000000..78b24833d9b --- /dev/null +++ b/packages/google-marketingplatform-admin/protos/google/marketingplatform/admin/v1alpha/resources.proto @@ -0,0 +1,103 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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.marketingplatform.admin.v1alpha; + +import "google/api/field_behavior.proto"; +import "google/api/resource.proto"; + +option csharp_namespace = "Google.Ads.MarketingPlatform.Admin.V1Alpha"; +option go_package = "google.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;admin"; +option java_multiple_files = true; +option java_outer_classname = "ResourcesProto"; +option java_package = "com.google.ads.marketingplatform.admin.v1alpha"; +option php_namespace = "Google\\Ads\\MarketingPlatform\\Admin\\V1alpha"; +option ruby_package = "Google::Ads::MarketingPlatform::Admin::V1alpha"; +option (google.api.resource_definition) = { + type: "analyticsadmin.googleapis.com/Account" + pattern: "accounts/{account}" +}; + +// The verification state of the link between a product account and a GMP +// organization. +enum LinkVerificationState { + // The link state is unknown. + LINK_VERIFICATION_STATE_UNSPECIFIED = 0; + + // The link is established. + LINK_VERIFICATION_STATE_VERIFIED = 1; + + // The link is requested, but hasn't been approved by the product account + // admin. + LINK_VERIFICATION_STATE_NOT_VERIFIED = 2; +} + +// A resource message representing a Google Marketing Platform organization. +message Organization { + option (google.api.resource) = { + type: "marketingplatformadmin.googleapis.com/Organization" + pattern: "organizations/{organization}" + plural: "organizations" + singular: "organization" + }; + + // Identifier. The resource name of the GMP organization. + // Format: organizations/{org_id} + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // The human-readable name for the organization. + string display_name = 2; +} + +// A resource message representing the link between a Google Analytics account +// and a Google Marketing Platform organization. +message AnalyticsAccountLink { + option (google.api.resource) = { + type: "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + pattern: "organizations/{organization}/analyticsAccountLinks/{analytics_account_link}" + plural: "analyticsAccountLinks" + singular: "analyticsAccountLink" + }; + + // Identifier. Resource name of this AnalyticsAccountLink. Note the resource + // ID is the same as the ID of the Analtyics account. + // + // Format: + // organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + // Example: "organizations/xyz/analyticsAccountLinks/1234" + string name = 1 [(google.api.field_behavior) = IDENTIFIER]; + + // Required. Immutable. The resource name of the AnalyticsAdmin API account. + // The account ID will be used as the ID of this AnalyticsAccountLink + // resource, which will become the final component of the resource name. + // + // Format: analyticsadmin.googleapis.com/accounts/{account_id} + string analytics_account = 2 [ + (google.api.field_behavior) = REQUIRED, + (google.api.field_behavior) = IMMUTABLE, + (google.api.resource_reference) = { + type: "analyticsadmin.googleapis.com/Account" + } + ]; + + // Output only. The human-readable name for the Analytics account. + string display_name = 3 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The verification state of the link between the Analytics + // account and the parent organization. + LinkVerificationState link_verification_state = 4 + [(google.api.field_behavior) = OUTPUT_ONLY]; +} diff --git a/packages/google-marketingplatform-admin/protos/protos.d.ts b/packages/google-marketingplatform-admin/protos/protos.d.ts new file mode 100644 index 00000000000..e93cc07bc98 --- /dev/null +++ b/packages/google-marketingplatform-admin/protos/protos.d.ts @@ -0,0 +1,7517 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.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 marketingplatform. */ + namespace marketingplatform { + + /** Namespace admin. */ + namespace admin { + + /** Namespace v1alpha. */ + namespace v1alpha { + + /** Represents a MarketingplatformAdminService */ + class MarketingplatformAdminService extends $protobuf.rpc.Service { + + /** + * Constructs a new MarketingplatformAdminService 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 MarketingplatformAdminService 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): MarketingplatformAdminService; + + /** + * Calls GetOrganization. + * @param request GetOrganizationRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Organization + */ + public getOrganization(request: google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, callback: google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.GetOrganizationCallback): void; + + /** + * Calls GetOrganization. + * @param request GetOrganizationRequest message or plain object + * @returns Promise + */ + public getOrganization(request: google.marketingplatform.admin.v1alpha.IGetOrganizationRequest): Promise; + + /** + * Calls ListAnalyticsAccountLinks. + * @param request ListAnalyticsAccountLinksRequest message or plain object + * @param callback Node-style callback called with the error, if any, and ListAnalyticsAccountLinksResponse + */ + public listAnalyticsAccountLinks(request: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, callback: google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.ListAnalyticsAccountLinksCallback): void; + + /** + * Calls ListAnalyticsAccountLinks. + * @param request ListAnalyticsAccountLinksRequest message or plain object + * @returns Promise + */ + public listAnalyticsAccountLinks(request: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest): Promise; + + /** + * Calls CreateAnalyticsAccountLink. + * @param request CreateAnalyticsAccountLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and AnalyticsAccountLink + */ + public createAnalyticsAccountLink(request: google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, callback: google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.CreateAnalyticsAccountLinkCallback): void; + + /** + * Calls CreateAnalyticsAccountLink. + * @param request CreateAnalyticsAccountLinkRequest message or plain object + * @returns Promise + */ + public createAnalyticsAccountLink(request: google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest): Promise; + + /** + * Calls DeleteAnalyticsAccountLink. + * @param request DeleteAnalyticsAccountLinkRequest message or plain object + * @param callback Node-style callback called with the error, if any, and Empty + */ + public deleteAnalyticsAccountLink(request: google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, callback: google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.DeleteAnalyticsAccountLinkCallback): void; + + /** + * Calls DeleteAnalyticsAccountLink. + * @param request DeleteAnalyticsAccountLinkRequest message or plain object + * @returns Promise + */ + public deleteAnalyticsAccountLink(request: google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest): Promise; + + /** + * Calls SetPropertyServiceLevel. + * @param request SetPropertyServiceLevelRequest message or plain object + * @param callback Node-style callback called with the error, if any, and SetPropertyServiceLevelResponse + */ + public setPropertyServiceLevel(request: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, callback: google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.SetPropertyServiceLevelCallback): void; + + /** + * Calls SetPropertyServiceLevel. + * @param request SetPropertyServiceLevelRequest message or plain object + * @returns Promise + */ + public setPropertyServiceLevel(request: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest): Promise; + } + + namespace MarketingplatformAdminService { + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|getOrganization}. + * @param error Error, if any + * @param [response] Organization + */ + type GetOrganizationCallback = (error: (Error|null), response?: google.marketingplatform.admin.v1alpha.Organization) => void; + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|listAnalyticsAccountLinks}. + * @param error Error, if any + * @param [response] ListAnalyticsAccountLinksResponse + */ + type ListAnalyticsAccountLinksCallback = (error: (Error|null), response?: google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse) => void; + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|createAnalyticsAccountLink}. + * @param error Error, if any + * @param [response] AnalyticsAccountLink + */ + type CreateAnalyticsAccountLinkCallback = (error: (Error|null), response?: google.marketingplatform.admin.v1alpha.AnalyticsAccountLink) => void; + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|deleteAnalyticsAccountLink}. + * @param error Error, if any + * @param [response] Empty + */ + type DeleteAnalyticsAccountLinkCallback = (error: (Error|null), response?: google.protobuf.Empty) => void; + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|setPropertyServiceLevel}. + * @param error Error, if any + * @param [response] SetPropertyServiceLevelResponse + */ + type SetPropertyServiceLevelCallback = (error: (Error|null), response?: google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse) => void; + } + + /** AnalyticsServiceLevel enum. */ + enum AnalyticsServiceLevel { + ANALYTICS_SERVICE_LEVEL_UNSPECIFIED = 0, + ANALYTICS_SERVICE_LEVEL_STANDARD = 1, + ANALYTICS_SERVICE_LEVEL_360 = 2 + } + + /** Properties of a GetOrganizationRequest. */ + interface IGetOrganizationRequest { + + /** GetOrganizationRequest name */ + name?: (string|null); + } + + /** Represents a GetOrganizationRequest. */ + class GetOrganizationRequest implements IGetOrganizationRequest { + + /** + * Constructs a new GetOrganizationRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.IGetOrganizationRequest); + + /** GetOrganizationRequest name. */ + public name: string; + + /** + * Creates a new GetOrganizationRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns GetOrganizationRequest instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.IGetOrganizationRequest): google.marketingplatform.admin.v1alpha.GetOrganizationRequest; + + /** + * Encodes the specified GetOrganizationRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.GetOrganizationRequest.verify|verify} messages. + * @param message GetOrganizationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GetOrganizationRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.GetOrganizationRequest.verify|verify} messages. + * @param message GetOrganizationRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GetOrganizationRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GetOrganizationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.GetOrganizationRequest; + + /** + * Decodes a GetOrganizationRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GetOrganizationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.GetOrganizationRequest; + + /** + * Verifies a GetOrganizationRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GetOrganizationRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GetOrganizationRequest + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.GetOrganizationRequest; + + /** + * Creates a plain object from a GetOrganizationRequest message. Also converts values to other types if specified. + * @param message GetOrganizationRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.GetOrganizationRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GetOrganizationRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GetOrganizationRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAnalyticsAccountLinksRequest. */ + interface IListAnalyticsAccountLinksRequest { + + /** ListAnalyticsAccountLinksRequest parent */ + parent?: (string|null); + + /** ListAnalyticsAccountLinksRequest pageSize */ + pageSize?: (number|null); + + /** ListAnalyticsAccountLinksRequest pageToken */ + pageToken?: (string|null); + } + + /** Represents a ListAnalyticsAccountLinksRequest. */ + class ListAnalyticsAccountLinksRequest implements IListAnalyticsAccountLinksRequest { + + /** + * Constructs a new ListAnalyticsAccountLinksRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest); + + /** ListAnalyticsAccountLinksRequest parent. */ + public parent: string; + + /** ListAnalyticsAccountLinksRequest pageSize. */ + public pageSize: number; + + /** ListAnalyticsAccountLinksRequest pageToken. */ + public pageToken: string; + + /** + * Creates a new ListAnalyticsAccountLinksRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAnalyticsAccountLinksRequest instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; + + /** + * Encodes the specified ListAnalyticsAccountLinksRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest.verify|verify} messages. + * @param message ListAnalyticsAccountLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAnalyticsAccountLinksRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest.verify|verify} messages. + * @param message ListAnalyticsAccountLinksRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAnalyticsAccountLinksRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAnalyticsAccountLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; + + /** + * Decodes a ListAnalyticsAccountLinksRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAnalyticsAccountLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; + + /** + * Verifies a ListAnalyticsAccountLinksRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAnalyticsAccountLinksRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAnalyticsAccountLinksRequest + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest; + + /** + * Creates a plain object from a ListAnalyticsAccountLinksRequest message. Also converts values to other types if specified. + * @param message ListAnalyticsAccountLinksRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAnalyticsAccountLinksRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAnalyticsAccountLinksRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ListAnalyticsAccountLinksResponse. */ + interface IListAnalyticsAccountLinksResponse { + + /** ListAnalyticsAccountLinksResponse analyticsAccountLinks */ + analyticsAccountLinks?: (google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[]|null); + + /** ListAnalyticsAccountLinksResponse nextPageToken */ + nextPageToken?: (string|null); + } + + /** Represents a ListAnalyticsAccountLinksResponse. */ + class ListAnalyticsAccountLinksResponse implements IListAnalyticsAccountLinksResponse { + + /** + * Constructs a new ListAnalyticsAccountLinksResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse); + + /** ListAnalyticsAccountLinksResponse analyticsAccountLinks. */ + public analyticsAccountLinks: google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[]; + + /** ListAnalyticsAccountLinksResponse nextPageToken. */ + public nextPageToken: string; + + /** + * Creates a new ListAnalyticsAccountLinksResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns ListAnalyticsAccountLinksResponse instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; + + /** + * Encodes the specified ListAnalyticsAccountLinksResponse message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse.verify|verify} messages. + * @param message ListAnalyticsAccountLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ListAnalyticsAccountLinksResponse message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse.verify|verify} messages. + * @param message ListAnalyticsAccountLinksResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ListAnalyticsAccountLinksResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ListAnalyticsAccountLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; + + /** + * Decodes a ListAnalyticsAccountLinksResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ListAnalyticsAccountLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; + + /** + * Verifies a ListAnalyticsAccountLinksResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ListAnalyticsAccountLinksResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ListAnalyticsAccountLinksResponse + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse; + + /** + * Creates a plain object from a ListAnalyticsAccountLinksResponse message. Also converts values to other types if specified. + * @param message ListAnalyticsAccountLinksResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ListAnalyticsAccountLinksResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ListAnalyticsAccountLinksResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CreateAnalyticsAccountLinkRequest. */ + interface ICreateAnalyticsAccountLinkRequest { + + /** CreateAnalyticsAccountLinkRequest parent */ + parent?: (string|null); + + /** CreateAnalyticsAccountLinkRequest analyticsAccountLink */ + analyticsAccountLink?: (google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink|null); + } + + /** Represents a CreateAnalyticsAccountLinkRequest. */ + class CreateAnalyticsAccountLinkRequest implements ICreateAnalyticsAccountLinkRequest { + + /** + * Constructs a new CreateAnalyticsAccountLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest); + + /** CreateAnalyticsAccountLinkRequest parent. */ + public parent: string; + + /** CreateAnalyticsAccountLinkRequest analyticsAccountLink. */ + public analyticsAccountLink?: (google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink|null); + + /** + * Creates a new CreateAnalyticsAccountLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns CreateAnalyticsAccountLinkRequest instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest): google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; + + /** + * Encodes the specified CreateAnalyticsAccountLinkRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest.verify|verify} messages. + * @param message CreateAnalyticsAccountLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CreateAnalyticsAccountLinkRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest.verify|verify} messages. + * @param message CreateAnalyticsAccountLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CreateAnalyticsAccountLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CreateAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; + + /** + * Decodes a CreateAnalyticsAccountLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CreateAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; + + /** + * Verifies a CreateAnalyticsAccountLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CreateAnalyticsAccountLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CreateAnalyticsAccountLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest; + + /** + * Creates a plain object from a CreateAnalyticsAccountLinkRequest message. Also converts values to other types if specified. + * @param message CreateAnalyticsAccountLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CreateAnalyticsAccountLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CreateAnalyticsAccountLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DeleteAnalyticsAccountLinkRequest. */ + interface IDeleteAnalyticsAccountLinkRequest { + + /** DeleteAnalyticsAccountLinkRequest name */ + name?: (string|null); + } + + /** Represents a DeleteAnalyticsAccountLinkRequest. */ + class DeleteAnalyticsAccountLinkRequest implements IDeleteAnalyticsAccountLinkRequest { + + /** + * Constructs a new DeleteAnalyticsAccountLinkRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest); + + /** DeleteAnalyticsAccountLinkRequest name. */ + public name: string; + + /** + * Creates a new DeleteAnalyticsAccountLinkRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns DeleteAnalyticsAccountLinkRequest instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest): google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; + + /** + * Encodes the specified DeleteAnalyticsAccountLinkRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest.verify|verify} messages. + * @param message DeleteAnalyticsAccountLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DeleteAnalyticsAccountLinkRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest.verify|verify} messages. + * @param message DeleteAnalyticsAccountLinkRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DeleteAnalyticsAccountLinkRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DeleteAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; + + /** + * Decodes a DeleteAnalyticsAccountLinkRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DeleteAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; + + /** + * Verifies a DeleteAnalyticsAccountLinkRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DeleteAnalyticsAccountLinkRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DeleteAnalyticsAccountLinkRequest + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest; + + /** + * Creates a plain object from a DeleteAnalyticsAccountLinkRequest message. Also converts values to other types if specified. + * @param message DeleteAnalyticsAccountLinkRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DeleteAnalyticsAccountLinkRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DeleteAnalyticsAccountLinkRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPropertyServiceLevelRequest. */ + interface ISetPropertyServiceLevelRequest { + + /** SetPropertyServiceLevelRequest analyticsAccountLink */ + analyticsAccountLink?: (string|null); + + /** SetPropertyServiceLevelRequest analyticsProperty */ + analyticsProperty?: (string|null); + + /** SetPropertyServiceLevelRequest serviceLevel */ + serviceLevel?: (google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel|keyof typeof google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel|null); + } + + /** Represents a SetPropertyServiceLevelRequest. */ + class SetPropertyServiceLevelRequest implements ISetPropertyServiceLevelRequest { + + /** + * Constructs a new SetPropertyServiceLevelRequest. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest); + + /** SetPropertyServiceLevelRequest analyticsAccountLink. */ + public analyticsAccountLink: string; + + /** SetPropertyServiceLevelRequest analyticsProperty. */ + public analyticsProperty: string; + + /** SetPropertyServiceLevelRequest serviceLevel. */ + public serviceLevel: (google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel|keyof typeof google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel); + + /** + * Creates a new SetPropertyServiceLevelRequest instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPropertyServiceLevelRequest instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; + + /** + * Encodes the specified SetPropertyServiceLevelRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest.verify|verify} messages. + * @param message SetPropertyServiceLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPropertyServiceLevelRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest.verify|verify} messages. + * @param message SetPropertyServiceLevelRequest message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPropertyServiceLevelRequest message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPropertyServiceLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; + + /** + * Decodes a SetPropertyServiceLevelRequest message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPropertyServiceLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; + + /** + * Verifies a SetPropertyServiceLevelRequest message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetPropertyServiceLevelRequest message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPropertyServiceLevelRequest + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest; + + /** + * Creates a plain object from a SetPropertyServiceLevelRequest message. Also converts values to other types if specified. + * @param message SetPropertyServiceLevelRequest + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPropertyServiceLevelRequest to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPropertyServiceLevelRequest + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SetPropertyServiceLevelResponse. */ + interface ISetPropertyServiceLevelResponse { + } + + /** Represents a SetPropertyServiceLevelResponse. */ + class SetPropertyServiceLevelResponse implements ISetPropertyServiceLevelResponse { + + /** + * Constructs a new SetPropertyServiceLevelResponse. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse); + + /** + * Creates a new SetPropertyServiceLevelResponse instance using the specified properties. + * @param [properties] Properties to set + * @returns SetPropertyServiceLevelResponse instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; + + /** + * Encodes the specified SetPropertyServiceLevelResponse message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse.verify|verify} messages. + * @param message SetPropertyServiceLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SetPropertyServiceLevelResponse message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse.verify|verify} messages. + * @param message SetPropertyServiceLevelResponse message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SetPropertyServiceLevelResponse message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SetPropertyServiceLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; + + /** + * Decodes a SetPropertyServiceLevelResponse message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SetPropertyServiceLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; + + /** + * Verifies a SetPropertyServiceLevelResponse message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SetPropertyServiceLevelResponse message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SetPropertyServiceLevelResponse + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse; + + /** + * Creates a plain object from a SetPropertyServiceLevelResponse message. Also converts values to other types if specified. + * @param message SetPropertyServiceLevelResponse + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SetPropertyServiceLevelResponse to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SetPropertyServiceLevelResponse + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** LinkVerificationState enum. */ + enum LinkVerificationState { + LINK_VERIFICATION_STATE_UNSPECIFIED = 0, + LINK_VERIFICATION_STATE_VERIFIED = 1, + LINK_VERIFICATION_STATE_NOT_VERIFIED = 2 + } + + /** Properties of an Organization. */ + interface IOrganization { + + /** Organization name */ + name?: (string|null); + + /** Organization displayName */ + displayName?: (string|null); + } + + /** Represents an Organization. */ + class Organization implements IOrganization { + + /** + * Constructs a new Organization. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.IOrganization); + + /** Organization name. */ + public name: string; + + /** Organization displayName. */ + public displayName: string; + + /** + * Creates a new Organization instance using the specified properties. + * @param [properties] Properties to set + * @returns Organization instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.IOrganization): google.marketingplatform.admin.v1alpha.Organization; + + /** + * Encodes the specified Organization message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.Organization.verify|verify} messages. + * @param message Organization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.IOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Organization message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.Organization.verify|verify} messages. + * @param message Organization message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.IOrganization, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Organization message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Organization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.Organization; + + /** + * Decodes an Organization message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Organization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.Organization; + + /** + * Verifies an Organization message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Organization message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Organization + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.Organization; + + /** + * Creates a plain object from an Organization message. Also converts values to other types if specified. + * @param message Organization + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.Organization, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Organization to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Organization + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an AnalyticsAccountLink. */ + interface IAnalyticsAccountLink { + + /** AnalyticsAccountLink name */ + name?: (string|null); + + /** AnalyticsAccountLink analyticsAccount */ + analyticsAccount?: (string|null); + + /** AnalyticsAccountLink displayName */ + displayName?: (string|null); + + /** AnalyticsAccountLink linkVerificationState */ + linkVerificationState?: (google.marketingplatform.admin.v1alpha.LinkVerificationState|keyof typeof google.marketingplatform.admin.v1alpha.LinkVerificationState|null); + } + + /** Represents an AnalyticsAccountLink. */ + class AnalyticsAccountLink implements IAnalyticsAccountLink { + + /** + * Constructs a new AnalyticsAccountLink. + * @param [properties] Properties to set + */ + constructor(properties?: google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink); + + /** AnalyticsAccountLink name. */ + public name: string; + + /** AnalyticsAccountLink analyticsAccount. */ + public analyticsAccount: string; + + /** AnalyticsAccountLink displayName. */ + public displayName: string; + + /** AnalyticsAccountLink linkVerificationState. */ + public linkVerificationState: (google.marketingplatform.admin.v1alpha.LinkVerificationState|keyof typeof google.marketingplatform.admin.v1alpha.LinkVerificationState); + + /** + * Creates a new AnalyticsAccountLink instance using the specified properties. + * @param [properties] Properties to set + * @returns AnalyticsAccountLink instance + */ + public static create(properties?: google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink): google.marketingplatform.admin.v1alpha.AnalyticsAccountLink; + + /** + * Encodes the specified AnalyticsAccountLink message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.verify|verify} messages. + * @param message AnalyticsAccountLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified AnalyticsAccountLink message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.verify|verify} messages. + * @param message AnalyticsAccountLink message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an AnalyticsAccountLink message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns AnalyticsAccountLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.marketingplatform.admin.v1alpha.AnalyticsAccountLink; + + /** + * Decodes an AnalyticsAccountLink message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns AnalyticsAccountLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.marketingplatform.admin.v1alpha.AnalyticsAccountLink; + + /** + * Verifies an AnalyticsAccountLink message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an AnalyticsAccountLink message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns AnalyticsAccountLink + */ + public static fromObject(object: { [k: string]: any }): google.marketingplatform.admin.v1alpha.AnalyticsAccountLink; + + /** + * Creates a plain object from an AnalyticsAccountLink message. Also converts values to other types if specified. + * @param message AnalyticsAccountLink + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.marketingplatform.admin.v1alpha.AnalyticsAccountLink, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this AnalyticsAccountLink to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for AnalyticsAccountLink + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + } + } + + /** Namespace api. */ + namespace api { + + /** Properties of a 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); + } + + /** 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; + + /** + * Creates a new Publishing instance using the specified properties. + * @param [properties] Properties to set + * @returns Publishing instance + */ + public static create(properties?: google.api.IPublishing): google.api.Publishing; + + /** + * Encodes the specified Publishing message. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Publishing message, length delimited. Does not implicitly {@link google.api.Publishing.verify|verify} messages. + * @param message Publishing message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPublishing, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Publishing message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.Publishing; + + /** + * Decodes a Publishing message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Publishing + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.Publishing; + + /** + * Verifies a Publishing message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Publishing message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Publishing + */ + public static fromObject(object: { [k: string]: any }): google.api.Publishing; + + /** + * Creates a plain object from a Publishing message. Also converts values to other types if specified. + * @param message Publishing + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.Publishing, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Publishing to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Publishing + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a JavaSettings. */ + interface IJavaSettings { + + /** JavaSettings libraryPackage */ + libraryPackage?: (string|null); + + /** JavaSettings serviceClassNames */ + serviceClassNames?: ({ [k: string]: string }|null); + + /** JavaSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a JavaSettings. */ + class JavaSettings implements IJavaSettings { + + /** + * Constructs a new JavaSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IJavaSettings); + + /** JavaSettings libraryPackage. */ + public libraryPackage: string; + + /** JavaSettings serviceClassNames. */ + public serviceClassNames: { [k: string]: string }; + + /** JavaSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new JavaSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns JavaSettings instance + */ + public static create(properties?: google.api.IJavaSettings): google.api.JavaSettings; + + /** + * Encodes the specified JavaSettings message. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified JavaSettings message, length delimited. Does not implicitly {@link google.api.JavaSettings.verify|verify} messages. + * @param message JavaSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IJavaSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a JavaSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.JavaSettings; + + /** + * Decodes a JavaSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns JavaSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.JavaSettings; + + /** + * Verifies a JavaSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a JavaSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns JavaSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.JavaSettings; + + /** + * Creates a plain object from a JavaSettings message. Also converts values to other types if specified. + * @param message JavaSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.JavaSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this JavaSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for JavaSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a CppSettings. */ + interface ICppSettings { + + /** CppSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a CppSettings. */ + class CppSettings implements ICppSettings { + + /** + * Constructs a new CppSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.ICppSettings); + + /** CppSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new CppSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns CppSettings instance + */ + public static create(properties?: google.api.ICppSettings): google.api.CppSettings; + + /** + * Encodes the specified CppSettings message. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified CppSettings message, length delimited. Does not implicitly {@link google.api.CppSettings.verify|verify} messages. + * @param message CppSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.ICppSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a CppSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.CppSettings; + + /** + * Decodes a CppSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns CppSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.CppSettings; + + /** + * Verifies a CppSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CppSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CppSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.CppSettings; + + /** + * Creates a plain object from a CppSettings message. Also converts values to other types if specified. + * @param message CppSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.CppSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CppSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CppSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PhpSettings. */ + interface IPhpSettings { + + /** PhpSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PhpSettings. */ + class PhpSettings implements IPhpSettings { + + /** + * Constructs a new PhpSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPhpSettings); + + /** PhpSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PhpSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PhpSettings instance + */ + public static create(properties?: google.api.IPhpSettings): google.api.PhpSettings; + + /** + * Encodes the specified PhpSettings message. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PhpSettings message, length delimited. Does not implicitly {@link google.api.PhpSettings.verify|verify} messages. + * @param message PhpSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPhpSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PhpSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PhpSettings; + + /** + * Decodes a PhpSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PhpSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PhpSettings; + + /** + * Verifies a PhpSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PhpSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PhpSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PhpSettings; + + /** + * Creates a plain object from a PhpSettings message. Also converts values to other types if specified. + * @param message PhpSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PhpSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PhpSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PhpSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a PythonSettings. */ + interface IPythonSettings { + + /** PythonSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a PythonSettings. */ + class PythonSettings implements IPythonSettings { + + /** + * Constructs a new PythonSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IPythonSettings); + + /** PythonSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new PythonSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns PythonSettings instance + */ + public static create(properties?: google.api.IPythonSettings): google.api.PythonSettings; + + /** + * Encodes the specified PythonSettings message. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified PythonSettings message, length delimited. Does not implicitly {@link google.api.PythonSettings.verify|verify} messages. + * @param message PythonSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IPythonSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a PythonSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.PythonSettings; + + /** + * Decodes a PythonSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns PythonSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.PythonSettings; + + /** + * Verifies a PythonSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a PythonSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns PythonSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.PythonSettings; + + /** + * Creates a plain object from a PythonSettings message. Also converts values to other types if specified. + * @param message PythonSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.PythonSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this PythonSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for PythonSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a NodeSettings. */ + interface INodeSettings { + + /** NodeSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a NodeSettings. */ + class NodeSettings implements INodeSettings { + + /** + * Constructs a new NodeSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.INodeSettings); + + /** NodeSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new NodeSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns NodeSettings instance + */ + public static create(properties?: google.api.INodeSettings): google.api.NodeSettings; + + /** + * Encodes the specified NodeSettings message. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodeSettings message, length delimited. Does not implicitly {@link google.api.NodeSettings.verify|verify} messages. + * @param message NodeSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.INodeSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodeSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.NodeSettings; + + /** + * Decodes a NodeSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodeSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.NodeSettings; + + /** + * Verifies a NodeSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NodeSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NodeSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.NodeSettings; + + /** + * Creates a plain object from a NodeSettings message. Also converts values to other types if specified. + * @param message NodeSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.NodeSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NodeSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NodeSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DotnetSettings. */ + interface IDotnetSettings { + + /** DotnetSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices */ + renamedServices?: ({ [k: string]: string }|null); + + /** DotnetSettings renamedResources */ + renamedResources?: ({ [k: string]: string }|null); + + /** DotnetSettings ignoredResources */ + ignoredResources?: (string[]|null); + + /** DotnetSettings forcedNamespaceAliases */ + forcedNamespaceAliases?: (string[]|null); + + /** DotnetSettings handwrittenSignatures */ + handwrittenSignatures?: (string[]|null); + } + + /** Represents a DotnetSettings. */ + class DotnetSettings implements IDotnetSettings { + + /** + * Constructs a new DotnetSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IDotnetSettings); + + /** DotnetSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** DotnetSettings renamedServices. */ + public renamedServices: { [k: string]: string }; + + /** DotnetSettings renamedResources. */ + public renamedResources: { [k: string]: string }; + + /** DotnetSettings ignoredResources. */ + public ignoredResources: string[]; + + /** DotnetSettings forcedNamespaceAliases. */ + public forcedNamespaceAliases: string[]; + + /** DotnetSettings handwrittenSignatures. */ + public handwrittenSignatures: string[]; + + /** + * Creates a new DotnetSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns DotnetSettings instance + */ + public static create(properties?: google.api.IDotnetSettings): google.api.DotnetSettings; + + /** + * Encodes the specified DotnetSettings message. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DotnetSettings message, length delimited. Does not implicitly {@link google.api.DotnetSettings.verify|verify} messages. + * @param message DotnetSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IDotnetSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.DotnetSettings; + + /** + * Decodes a DotnetSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DotnetSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.DotnetSettings; + + /** + * Verifies a DotnetSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DotnetSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DotnetSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.DotnetSettings; + + /** + * Creates a plain object from a DotnetSettings message. Also converts values to other types if specified. + * @param message DotnetSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.DotnetSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DotnetSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DotnetSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a RubySettings. */ + interface IRubySettings { + + /** RubySettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a RubySettings. */ + class RubySettings implements IRubySettings { + + /** + * Constructs a new RubySettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IRubySettings); + + /** RubySettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new RubySettings instance using the specified properties. + * @param [properties] Properties to set + * @returns RubySettings instance + */ + public static create(properties?: google.api.IRubySettings): google.api.RubySettings; + + /** + * Encodes the specified RubySettings message. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified RubySettings message, length delimited. Does not implicitly {@link google.api.RubySettings.verify|verify} messages. + * @param message RubySettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IRubySettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a RubySettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.RubySettings; + + /** + * Decodes a RubySettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns RubySettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.RubySettings; + + /** + * Verifies a RubySettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a RubySettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns RubySettings + */ + public static fromObject(object: { [k: string]: any }): google.api.RubySettings; + + /** + * Creates a plain object from a RubySettings message. Also converts values to other types if specified. + * @param message RubySettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.RubySettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this RubySettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for RubySettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a GoSettings. */ + interface IGoSettings { + + /** GoSettings common */ + common?: (google.api.ICommonLanguageSettings|null); + } + + /** Represents a GoSettings. */ + class GoSettings implements IGoSettings { + + /** + * Constructs a new GoSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IGoSettings); + + /** GoSettings common. */ + public common?: (google.api.ICommonLanguageSettings|null); + + /** + * Creates a new GoSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns GoSettings instance + */ + public static create(properties?: google.api.IGoSettings): google.api.GoSettings; + + /** + * Encodes the specified GoSettings message. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GoSettings message, length delimited. Does not implicitly {@link google.api.GoSettings.verify|verify} messages. + * @param message GoSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IGoSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GoSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.GoSettings; + + /** + * Decodes a GoSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GoSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.GoSettings; + + /** + * Verifies a GoSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GoSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GoSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.GoSettings; + + /** + * Creates a plain object from a GoSettings message. Also converts values to other types if specified. + * @param message GoSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.GoSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GoSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GoSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodSettings. */ + interface IMethodSettings { + + /** MethodSettings selector */ + selector?: (string|null); + + /** MethodSettings longRunning */ + longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields */ + autoPopulatedFields?: (string[]|null); + } + + /** Represents a MethodSettings. */ + class MethodSettings implements IMethodSettings { + + /** + * Constructs a new MethodSettings. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IMethodSettings); + + /** MethodSettings selector. */ + public selector: string; + + /** MethodSettings longRunning. */ + public longRunning?: (google.api.MethodSettings.ILongRunning|null); + + /** MethodSettings autoPopulatedFields. */ + public autoPopulatedFields: string[]; + + /** + * Creates a new MethodSettings instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodSettings instance + */ + public static create(properties?: google.api.IMethodSettings): google.api.MethodSettings; + + /** + * Encodes the specified MethodSettings message. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodSettings message, length delimited. Does not implicitly {@link google.api.MethodSettings.verify|verify} messages. + * @param message MethodSettings message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IMethodSettings, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodSettings message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings; + + /** + * Decodes a MethodSettings message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodSettings + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings; + + /** + * Verifies a MethodSettings message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodSettings message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodSettings + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings; + + /** + * Creates a plain object from a MethodSettings message. Also converts values to other types if specified. + * @param message MethodSettings + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodSettings to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodSettings + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodSettings { + + /** Properties of a LongRunning. */ + interface ILongRunning { + + /** LongRunning initialPollDelay */ + initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier */ + pollDelayMultiplier?: (number|null); + + /** LongRunning maxPollDelay */ + maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout */ + totalPollTimeout?: (google.protobuf.IDuration|null); + } + + /** Represents a LongRunning. */ + class LongRunning implements ILongRunning { + + /** + * Constructs a new LongRunning. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.MethodSettings.ILongRunning); + + /** LongRunning initialPollDelay. */ + public initialPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning pollDelayMultiplier. */ + public pollDelayMultiplier: number; + + /** LongRunning maxPollDelay. */ + public maxPollDelay?: (google.protobuf.IDuration|null); + + /** LongRunning totalPollTimeout. */ + public totalPollTimeout?: (google.protobuf.IDuration|null); + + /** + * Creates a new LongRunning instance using the specified properties. + * @param [properties] Properties to set + * @returns LongRunning instance + */ + public static create(properties?: google.api.MethodSettings.ILongRunning): google.api.MethodSettings.LongRunning; + + /** + * Encodes the specified LongRunning message. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified LongRunning message, length delimited. Does not implicitly {@link google.api.MethodSettings.LongRunning.verify|verify} messages. + * @param message LongRunning message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.MethodSettings.ILongRunning, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a LongRunning message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.MethodSettings.LongRunning; + + /** + * Decodes a LongRunning message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns LongRunning + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.MethodSettings.LongRunning; + + /** + * Verifies a LongRunning message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a LongRunning message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns LongRunning + */ + public static fromObject(object: { [k: string]: any }): google.api.MethodSettings.LongRunning; + + /** + * Creates a plain object from a LongRunning message. Also converts values to other types if specified. + * @param message LongRunning + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.MethodSettings.LongRunning, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this LongRunning to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for LongRunning + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** ClientLibraryOrganization enum. */ + enum ClientLibraryOrganization { + CLIENT_LIBRARY_ORGANIZATION_UNSPECIFIED = 0, + CLOUD = 1, + ADS = 2, + PHOTOS = 3, + STREET_VIEW = 4, + SHOPPING = 5, + GEO = 6, + GENERATIVE_AI = 7 + } + + /** ClientLibraryDestination enum. */ + enum ClientLibraryDestination { + CLIENT_LIBRARY_DESTINATION_UNSPECIFIED = 0, + GITHUB = 10, + PACKAGE_MANAGER = 20 + } + + /** LaunchStage enum. */ + enum LaunchStage { + LAUNCH_STAGE_UNSPECIFIED = 0, + UNIMPLEMENTED = 6, + PRELAUNCH = 7, + EARLY_ACCESS = 1, + ALPHA = 2, + BETA = 3, + GA = 4, + DEPRECATED = 5 + } + + /** FieldBehavior enum. */ + enum FieldBehavior { + FIELD_BEHAVIOR_UNSPECIFIED = 0, + OPTIONAL = 1, + REQUIRED = 2, + OUTPUT_ONLY = 3, + INPUT_ONLY = 4, + IMMUTABLE = 5, + UNORDERED_LIST = 6, + NON_EMPTY_DEFAULT = 7, + IDENTIFIER = 8 + } + + /** Properties of a ResourceDescriptor. */ + interface IResourceDescriptor { + + /** ResourceDescriptor type */ + type?: (string|null); + + /** ResourceDescriptor pattern */ + pattern?: (string[]|null); + + /** ResourceDescriptor nameField */ + nameField?: (string|null); + + /** ResourceDescriptor history */ + history?: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History|null); + + /** ResourceDescriptor plural */ + plural?: (string|null); + + /** ResourceDescriptor singular */ + singular?: (string|null); + + /** ResourceDescriptor style */ + style?: (google.api.ResourceDescriptor.Style[]|null); + } + + /** Represents a ResourceDescriptor. */ + class ResourceDescriptor implements IResourceDescriptor { + + /** + * Constructs a new ResourceDescriptor. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceDescriptor); + + /** ResourceDescriptor type. */ + public type: string; + + /** ResourceDescriptor pattern. */ + public pattern: string[]; + + /** ResourceDescriptor nameField. */ + public nameField: string; + + /** ResourceDescriptor history. */ + public history: (google.api.ResourceDescriptor.History|keyof typeof google.api.ResourceDescriptor.History); + + /** ResourceDescriptor plural. */ + public plural: string; + + /** ResourceDescriptor singular. */ + public singular: string; + + /** ResourceDescriptor style. */ + public style: google.api.ResourceDescriptor.Style[]; + + /** + * Creates a new ResourceDescriptor instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceDescriptor instance + */ + public static create(properties?: google.api.IResourceDescriptor): google.api.ResourceDescriptor; + + /** + * Encodes the specified ResourceDescriptor message. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceDescriptor message, length delimited. Does not implicitly {@link google.api.ResourceDescriptor.verify|verify} messages. + * @param message ResourceDescriptor message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceDescriptor, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceDescriptor; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceDescriptor; + + /** + * Verifies a ResourceDescriptor message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceDescriptor + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceDescriptor; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @param message ResourceDescriptor + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceDescriptor, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceDescriptor to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceDescriptor + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ResourceDescriptor { + + /** History enum. */ + enum History { + HISTORY_UNSPECIFIED = 0, + ORIGINALLY_SINGLE_PATTERN = 1, + FUTURE_MULTI_PATTERN = 2 + } + + /** Style enum. */ + enum Style { + STYLE_UNSPECIFIED = 0, + DECLARATIVE_FRIENDLY = 1 + } + } + + /** Properties of a ResourceReference. */ + interface IResourceReference { + + /** ResourceReference type */ + type?: (string|null); + + /** ResourceReference childType */ + childType?: (string|null); + } + + /** Represents a ResourceReference. */ + class ResourceReference implements IResourceReference { + + /** + * Constructs a new ResourceReference. + * @param [properties] Properties to set + */ + constructor(properties?: google.api.IResourceReference); + + /** ResourceReference type. */ + public type: string; + + /** ResourceReference childType. */ + public childType: string; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @param [properties] Properties to set + * @returns ResourceReference instance + */ + public static create(properties?: google.api.IResourceReference): google.api.ResourceReference; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @param message ResourceReference message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.api.IResourceReference, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.api.ResourceReference; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.api.ResourceReference; + + /** + * Verifies a ResourceReference message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ResourceReference + */ + public static fromObject(object: { [k: string]: any }): google.api.ResourceReference; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @param message ResourceReference + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.api.ResourceReference, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ResourceReference to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ResourceReference + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Namespace protobuf. */ + namespace protobuf { + + /** Properties of a FileDescriptorSet. */ + interface IFileDescriptorSet { + + /** FileDescriptorSet file */ + file?: (google.protobuf.IFileDescriptorProto[]|null); + } + + /** Represents a FileDescriptorSet. */ + class FileDescriptorSet implements IFileDescriptorSet { + + /** + * Constructs a new FileDescriptorSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorSet); + + /** FileDescriptorSet file. */ + public file: google.protobuf.IFileDescriptorProto[]; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorSet instance + */ + public static create(properties?: google.protobuf.IFileDescriptorSet): google.protobuf.FileDescriptorSet; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @param message FileDescriptorSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorSet; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorSet; + + /** + * Verifies a FileDescriptorSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorSet; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @param message FileDescriptorSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Edition enum. */ + enum Edition { + EDITION_UNKNOWN = 0, + EDITION_PROTO2 = 998, + EDITION_PROTO3 = 999, + EDITION_2023 = 1000, + EDITION_2024 = 1001, + EDITION_1_TEST_ONLY = 1, + EDITION_2_TEST_ONLY = 2, + EDITION_99997_TEST_ONLY = 99997, + EDITION_99998_TEST_ONLY = 99998, + EDITION_99999_TEST_ONLY = 99999, + EDITION_MAX = 2147483647 + } + + /** Properties of a FileDescriptorProto. */ + interface IFileDescriptorProto { + + /** FileDescriptorProto name */ + name?: (string|null); + + /** FileDescriptorProto package */ + "package"?: (string|null); + + /** FileDescriptorProto dependency */ + dependency?: (string[]|null); + + /** FileDescriptorProto publicDependency */ + publicDependency?: (number[]|null); + + /** FileDescriptorProto weakDependency */ + weakDependency?: (number[]|null); + + /** FileDescriptorProto messageType */ + messageType?: (google.protobuf.IDescriptorProto[]|null); + + /** FileDescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** FileDescriptorProto service */ + service?: (google.protobuf.IServiceDescriptorProto[]|null); + + /** FileDescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** FileDescriptorProto options */ + options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo */ + sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax */ + syntax?: (string|null); + + /** FileDescriptorProto edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FileDescriptorProto. */ + class FileDescriptorProto implements IFileDescriptorProto { + + /** + * Constructs a new FileDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileDescriptorProto); + + /** FileDescriptorProto name. */ + public name: string; + + /** FileDescriptorProto package. */ + public package: string; + + /** FileDescriptorProto dependency. */ + public dependency: string[]; + + /** FileDescriptorProto publicDependency. */ + public publicDependency: number[]; + + /** FileDescriptorProto weakDependency. */ + public weakDependency: number[]; + + /** FileDescriptorProto messageType. */ + public messageType: google.protobuf.IDescriptorProto[]; + + /** FileDescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** FileDescriptorProto service. */ + public service: google.protobuf.IServiceDescriptorProto[]; + + /** FileDescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** FileDescriptorProto options. */ + public options?: (google.protobuf.IFileOptions|null); + + /** FileDescriptorProto sourceCodeInfo. */ + public sourceCodeInfo?: (google.protobuf.ISourceCodeInfo|null); + + /** FileDescriptorProto syntax. */ + public syntax: string; + + /** FileDescriptorProto edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FileDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FileDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFileDescriptorProto): google.protobuf.FileDescriptorProto; + + /** + * Encodes the specified FileDescriptorProto message. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorProto.verify|verify} messages. + * @param message FileDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileDescriptorProto; + + /** + * Decodes a FileDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileDescriptorProto; + + /** + * Verifies a FileDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileDescriptorProto; + + /** + * Creates a plain object from a FileDescriptorProto message. Also converts values to other types if specified. + * @param message FileDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a DescriptorProto. */ + interface IDescriptorProto { + + /** DescriptorProto name */ + name?: (string|null); + + /** DescriptorProto field */ + field?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto extension */ + extension?: (google.protobuf.IFieldDescriptorProto[]|null); + + /** DescriptorProto nestedType */ + nestedType?: (google.protobuf.IDescriptorProto[]|null); + + /** DescriptorProto enumType */ + enumType?: (google.protobuf.IEnumDescriptorProto[]|null); + + /** DescriptorProto extensionRange */ + extensionRange?: (google.protobuf.DescriptorProto.IExtensionRange[]|null); + + /** DescriptorProto oneofDecl */ + oneofDecl?: (google.protobuf.IOneofDescriptorProto[]|null); + + /** DescriptorProto options */ + options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange */ + reservedRange?: (google.protobuf.DescriptorProto.IReservedRange[]|null); + + /** DescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents a DescriptorProto. */ + class DescriptorProto implements IDescriptorProto { + + /** + * Constructs a new DescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDescriptorProto); + + /** DescriptorProto name. */ + public name: string; + + /** DescriptorProto field. */ + public field: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto extension. */ + public extension: google.protobuf.IFieldDescriptorProto[]; + + /** DescriptorProto nestedType. */ + public nestedType: google.protobuf.IDescriptorProto[]; + + /** DescriptorProto enumType. */ + public enumType: google.protobuf.IEnumDescriptorProto[]; + + /** DescriptorProto extensionRange. */ + public extensionRange: google.protobuf.DescriptorProto.IExtensionRange[]; + + /** DescriptorProto oneofDecl. */ + public oneofDecl: google.protobuf.IOneofDescriptorProto[]; + + /** DescriptorProto options. */ + public options?: (google.protobuf.IMessageOptions|null); + + /** DescriptorProto reservedRange. */ + public reservedRange: google.protobuf.DescriptorProto.IReservedRange[]; + + /** DescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new DescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns DescriptorProto instance + */ + public static create(properties?: google.protobuf.IDescriptorProto): google.protobuf.DescriptorProto; + + /** + * Encodes the specified DescriptorProto message. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.verify|verify} messages. + * @param message DescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto; + + /** + * Verifies a DescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @param message DescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace DescriptorProto { + + /** Properties of an ExtensionRange. */ + interface IExtensionRange { + + /** ExtensionRange start */ + start?: (number|null); + + /** ExtensionRange end */ + end?: (number|null); + + /** ExtensionRange options */ + options?: (google.protobuf.IExtensionRangeOptions|null); + } + + /** Represents an ExtensionRange. */ + class ExtensionRange implements IExtensionRange { + + /** + * Constructs a new ExtensionRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IExtensionRange); + + /** ExtensionRange start. */ + public start: number; + + /** ExtensionRange end. */ + public end: number; + + /** ExtensionRange options. */ + public options?: (google.protobuf.IExtensionRangeOptions|null); + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IExtensionRange): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @param message ExtensionRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IExtensionRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Verifies an ExtensionRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ExtensionRange; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @param message ExtensionRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ExtensionRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ReservedRange. */ + interface IReservedRange { + + /** ReservedRange start */ + start?: (number|null); + + /** ReservedRange end */ + end?: (number|null); + } + + /** Represents a ReservedRange. */ + class ReservedRange implements IReservedRange { + + /** + * Constructs a new ReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.DescriptorProto.IReservedRange); + + /** ReservedRange start. */ + public start: number; + + /** ReservedRange end. */ + public end: number; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns ReservedRange instance + */ + public static create(properties?: google.protobuf.DescriptorProto.IReservedRange): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @param message ReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.DescriptorProto.IReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Verifies a ReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.DescriptorProto.ReservedRange; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @param message ReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.DescriptorProto.ReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an ExtensionRangeOptions. */ + interface IExtensionRangeOptions { + + /** ExtensionRangeOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ExtensionRangeOptions declaration */ + declaration?: (google.protobuf.ExtensionRangeOptions.IDeclaration[]|null); + + /** ExtensionRangeOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification */ + verification?: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState|null); + } + + /** Represents an ExtensionRangeOptions. */ + class ExtensionRangeOptions implements IExtensionRangeOptions { + + /** + * Constructs a new ExtensionRangeOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IExtensionRangeOptions); + + /** ExtensionRangeOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** ExtensionRangeOptions declaration. */ + public declaration: google.protobuf.ExtensionRangeOptions.IDeclaration[]; + + /** ExtensionRangeOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ExtensionRangeOptions verification. */ + public verification: (google.protobuf.ExtensionRangeOptions.VerificationState|keyof typeof google.protobuf.ExtensionRangeOptions.VerificationState); + + /** + * Creates a new ExtensionRangeOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ExtensionRangeOptions instance + */ + public static create(properties?: google.protobuf.IExtensionRangeOptions): google.protobuf.ExtensionRangeOptions; + + /** + * Encodes the specified ExtensionRangeOptions message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ExtensionRangeOptions message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.verify|verify} messages. + * @param message ExtensionRangeOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IExtensionRangeOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions; + + /** + * Decodes an ExtensionRangeOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ExtensionRangeOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions; + + /** + * Verifies an ExtensionRangeOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an ExtensionRangeOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ExtensionRangeOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions; + + /** + * Creates a plain object from an ExtensionRangeOptions message. Also converts values to other types if specified. + * @param message ExtensionRangeOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ExtensionRangeOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ExtensionRangeOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace ExtensionRangeOptions { + + /** Properties of a Declaration. */ + interface IDeclaration { + + /** Declaration number */ + number?: (number|null); + + /** Declaration fullName */ + fullName?: (string|null); + + /** Declaration type */ + type?: (string|null); + + /** Declaration reserved */ + reserved?: (boolean|null); + + /** Declaration repeated */ + repeated?: (boolean|null); + } + + /** Represents a Declaration. */ + class Declaration implements IDeclaration { + + /** + * Constructs a new Declaration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration); + + /** Declaration number. */ + public number: number; + + /** Declaration fullName. */ + public fullName: string; + + /** Declaration type. */ + public type: string; + + /** Declaration reserved. */ + public reserved: boolean; + + /** Declaration repeated. */ + public repeated: boolean; + + /** + * Creates a new Declaration instance using the specified properties. + * @param [properties] Properties to set + * @returns Declaration instance + */ + public static create(properties?: google.protobuf.ExtensionRangeOptions.IDeclaration): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Encodes the specified Declaration message. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Declaration message, length delimited. Does not implicitly {@link google.protobuf.ExtensionRangeOptions.Declaration.verify|verify} messages. + * @param message Declaration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ExtensionRangeOptions.IDeclaration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Declaration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Decodes a Declaration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Declaration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Verifies a Declaration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Declaration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Declaration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ExtensionRangeOptions.Declaration; + + /** + * Creates a plain object from a Declaration message. Also converts values to other types if specified. + * @param message Declaration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ExtensionRangeOptions.Declaration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Declaration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Declaration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** VerificationState enum. */ + enum VerificationState { + DECLARATION = 0, + UNVERIFIED = 1 + } + } + + /** Properties of a FieldDescriptorProto. */ + interface IFieldDescriptorProto { + + /** FieldDescriptorProto name */ + name?: (string|null); + + /** FieldDescriptorProto number */ + number?: (number|null); + + /** FieldDescriptorProto label */ + label?: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label|null); + + /** FieldDescriptorProto type */ + type?: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type|null); + + /** FieldDescriptorProto typeName */ + typeName?: (string|null); + + /** FieldDescriptorProto extendee */ + extendee?: (string|null); + + /** FieldDescriptorProto defaultValue */ + defaultValue?: (string|null); + + /** FieldDescriptorProto oneofIndex */ + oneofIndex?: (number|null); + + /** FieldDescriptorProto jsonName */ + jsonName?: (string|null); + + /** FieldDescriptorProto options */ + options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional */ + proto3Optional?: (boolean|null); + } + + /** Represents a FieldDescriptorProto. */ + class FieldDescriptorProto implements IFieldDescriptorProto { + + /** + * Constructs a new FieldDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldDescriptorProto); + + /** FieldDescriptorProto name. */ + public name: string; + + /** FieldDescriptorProto number. */ + public number: number; + + /** FieldDescriptorProto label. */ + public label: (google.protobuf.FieldDescriptorProto.Label|keyof typeof google.protobuf.FieldDescriptorProto.Label); + + /** FieldDescriptorProto type. */ + public type: (google.protobuf.FieldDescriptorProto.Type|keyof typeof google.protobuf.FieldDescriptorProto.Type); + + /** FieldDescriptorProto typeName. */ + public typeName: string; + + /** FieldDescriptorProto extendee. */ + public extendee: string; + + /** FieldDescriptorProto defaultValue. */ + public defaultValue: string; + + /** FieldDescriptorProto oneofIndex. */ + public oneofIndex: number; + + /** FieldDescriptorProto jsonName. */ + public jsonName: string; + + /** FieldDescriptorProto options. */ + public options?: (google.protobuf.IFieldOptions|null); + + /** FieldDescriptorProto proto3Optional. */ + public proto3Optional: boolean; + + /** + * Creates a new FieldDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldDescriptorProto instance + */ + public static create(properties?: google.protobuf.IFieldDescriptorProto): google.protobuf.FieldDescriptorProto; + + /** + * Encodes the specified FieldDescriptorProto message. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.FieldDescriptorProto.verify|verify} messages. + * @param message FieldDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldDescriptorProto; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldDescriptorProto; + + /** + * Verifies a FieldDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldDescriptorProto; + + /** + * Creates a plain object from a FieldDescriptorProto message. Also converts values to other types if specified. + * @param message FieldDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldDescriptorProto { + + /** Type enum. */ + enum Type { + TYPE_DOUBLE = 1, + TYPE_FLOAT = 2, + TYPE_INT64 = 3, + TYPE_UINT64 = 4, + TYPE_INT32 = 5, + TYPE_FIXED64 = 6, + TYPE_FIXED32 = 7, + TYPE_BOOL = 8, + TYPE_STRING = 9, + TYPE_GROUP = 10, + TYPE_MESSAGE = 11, + TYPE_BYTES = 12, + TYPE_UINT32 = 13, + TYPE_ENUM = 14, + TYPE_SFIXED32 = 15, + TYPE_SFIXED64 = 16, + TYPE_SINT32 = 17, + TYPE_SINT64 = 18 + } + + /** Label enum. */ + enum Label { + LABEL_OPTIONAL = 1, + LABEL_REPEATED = 3, + LABEL_REQUIRED = 2 + } + } + + /** Properties of an OneofDescriptorProto. */ + interface IOneofDescriptorProto { + + /** OneofDescriptorProto name */ + name?: (string|null); + + /** OneofDescriptorProto options */ + options?: (google.protobuf.IOneofOptions|null); + } + + /** Represents an OneofDescriptorProto. */ + class OneofDescriptorProto implements IOneofDescriptorProto { + + /** + * Constructs a new OneofDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofDescriptorProto); + + /** OneofDescriptorProto name. */ + public name: string; + + /** OneofDescriptorProto options. */ + public options?: (google.protobuf.IOneofOptions|null); + + /** + * Creates a new OneofDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofDescriptorProto instance + */ + public static create(properties?: google.protobuf.IOneofDescriptorProto): google.protobuf.OneofDescriptorProto; + + /** + * Encodes the specified OneofDescriptorProto message. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.OneofDescriptorProto.verify|verify} messages. + * @param message OneofDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofDescriptorProto; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofDescriptorProto; + + /** + * Verifies an OneofDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofDescriptorProto; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @param message OneofDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumDescriptorProto. */ + interface IEnumDescriptorProto { + + /** EnumDescriptorProto name */ + name?: (string|null); + + /** EnumDescriptorProto value */ + value?: (google.protobuf.IEnumValueDescriptorProto[]|null); + + /** EnumDescriptorProto options */ + options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange */ + reservedRange?: (google.protobuf.EnumDescriptorProto.IEnumReservedRange[]|null); + + /** EnumDescriptorProto reservedName */ + reservedName?: (string[]|null); + } + + /** Represents an EnumDescriptorProto. */ + class EnumDescriptorProto implements IEnumDescriptorProto { + + /** + * Constructs a new EnumDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumDescriptorProto); + + /** EnumDescriptorProto name. */ + public name: string; + + /** EnumDescriptorProto value. */ + public value: google.protobuf.IEnumValueDescriptorProto[]; + + /** EnumDescriptorProto options. */ + public options?: (google.protobuf.IEnumOptions|null); + + /** EnumDescriptorProto reservedRange. */ + public reservedRange: google.protobuf.EnumDescriptorProto.IEnumReservedRange[]; + + /** EnumDescriptorProto reservedName. */ + public reservedName: string[]; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumDescriptorProto): google.protobuf.EnumDescriptorProto; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @param message EnumDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto; + + /** + * Verifies an EnumDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @param message EnumDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace EnumDescriptorProto { + + /** Properties of an EnumReservedRange. */ + interface IEnumReservedRange { + + /** EnumReservedRange start */ + start?: (number|null); + + /** EnumReservedRange end */ + end?: (number|null); + } + + /** Represents an EnumReservedRange. */ + class EnumReservedRange implements IEnumReservedRange { + + /** + * Constructs a new EnumReservedRange. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange); + + /** EnumReservedRange start. */ + public start: number; + + /** EnumReservedRange end. */ + public end: number; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumReservedRange instance + */ + public static create(properties?: google.protobuf.EnumDescriptorProto.IEnumReservedRange): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @param message EnumReservedRange message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.EnumDescriptorProto.IEnumReservedRange, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Verifies an EnumReservedRange message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumReservedRange + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumDescriptorProto.EnumReservedRange; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @param message EnumReservedRange + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumDescriptorProto.EnumReservedRange, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumReservedRange to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumReservedRange + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an EnumValueDescriptorProto. */ + interface IEnumValueDescriptorProto { + + /** EnumValueDescriptorProto name */ + name?: (string|null); + + /** EnumValueDescriptorProto number */ + number?: (number|null); + + /** EnumValueDescriptorProto options */ + options?: (google.protobuf.IEnumValueOptions|null); + } + + /** Represents an EnumValueDescriptorProto. */ + class EnumValueDescriptorProto implements IEnumValueDescriptorProto { + + /** + * Constructs a new EnumValueDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueDescriptorProto); + + /** EnumValueDescriptorProto name. */ + public name: string; + + /** EnumValueDescriptorProto number. */ + public number: number; + + /** EnumValueDescriptorProto options. */ + public options?: (google.protobuf.IEnumValueOptions|null); + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueDescriptorProto instance + */ + public static create(properties?: google.protobuf.IEnumValueDescriptorProto): google.protobuf.EnumValueDescriptorProto; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @param message EnumValueDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueDescriptorProto; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueDescriptorProto; + + /** + * Verifies an EnumValueDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueDescriptorProto; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @param message EnumValueDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceDescriptorProto. */ + interface IServiceDescriptorProto { + + /** ServiceDescriptorProto name */ + name?: (string|null); + + /** ServiceDescriptorProto method */ + method?: (google.protobuf.IMethodDescriptorProto[]|null); + + /** ServiceDescriptorProto options */ + options?: (google.protobuf.IServiceOptions|null); + } + + /** Represents a ServiceDescriptorProto. */ + class ServiceDescriptorProto implements IServiceDescriptorProto { + + /** + * Constructs a new ServiceDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceDescriptorProto); + + /** ServiceDescriptorProto name. */ + public name: string; + + /** ServiceDescriptorProto method. */ + public method: google.protobuf.IMethodDescriptorProto[]; + + /** ServiceDescriptorProto options. */ + public options?: (google.protobuf.IServiceOptions|null); + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceDescriptorProto instance + */ + public static create(properties?: google.protobuf.IServiceDescriptorProto): google.protobuf.ServiceDescriptorProto; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @param message ServiceDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceDescriptorProto; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceDescriptorProto; + + /** + * Verifies a ServiceDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceDescriptorProto; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @param message ServiceDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodDescriptorProto. */ + interface IMethodDescriptorProto { + + /** MethodDescriptorProto name */ + name?: (string|null); + + /** MethodDescriptorProto inputType */ + inputType?: (string|null); + + /** MethodDescriptorProto outputType */ + outputType?: (string|null); + + /** MethodDescriptorProto options */ + options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming */ + clientStreaming?: (boolean|null); + + /** MethodDescriptorProto serverStreaming */ + serverStreaming?: (boolean|null); + } + + /** Represents a MethodDescriptorProto. */ + class MethodDescriptorProto implements IMethodDescriptorProto { + + /** + * Constructs a new MethodDescriptorProto. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodDescriptorProto); + + /** MethodDescriptorProto name. */ + public name: string; + + /** MethodDescriptorProto inputType. */ + public inputType: string; + + /** MethodDescriptorProto outputType. */ + public outputType: string; + + /** MethodDescriptorProto options. */ + public options?: (google.protobuf.IMethodOptions|null); + + /** MethodDescriptorProto clientStreaming. */ + public clientStreaming: boolean; + + /** MethodDescriptorProto serverStreaming. */ + public serverStreaming: boolean; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodDescriptorProto instance + */ + public static create(properties?: google.protobuf.IMethodDescriptorProto): google.protobuf.MethodDescriptorProto; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @param message MethodDescriptorProto message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodDescriptorProto, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodDescriptorProto; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodDescriptorProto; + + /** + * Verifies a MethodDescriptorProto message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodDescriptorProto + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodDescriptorProto; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @param message MethodDescriptorProto + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodDescriptorProto, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodDescriptorProto + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FileOptions. */ + interface IFileOptions { + + /** FileOptions javaPackage */ + javaPackage?: (string|null); + + /** FileOptions javaOuterClassname */ + javaOuterClassname?: (string|null); + + /** FileOptions javaMultipleFiles */ + javaMultipleFiles?: (boolean|null); + + /** FileOptions javaGenerateEqualsAndHash */ + javaGenerateEqualsAndHash?: (boolean|null); + + /** FileOptions javaStringCheckUtf8 */ + javaStringCheckUtf8?: (boolean|null); + + /** FileOptions optimizeFor */ + optimizeFor?: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode|null); + + /** FileOptions goPackage */ + goPackage?: (string|null); + + /** FileOptions ccGenericServices */ + ccGenericServices?: (boolean|null); + + /** FileOptions javaGenericServices */ + javaGenericServices?: (boolean|null); + + /** FileOptions pyGenericServices */ + pyGenericServices?: (boolean|null); + + /** FileOptions deprecated */ + deprecated?: (boolean|null); + + /** FileOptions ccEnableArenas */ + ccEnableArenas?: (boolean|null); + + /** FileOptions objcClassPrefix */ + objcClassPrefix?: (string|null); + + /** FileOptions csharpNamespace */ + csharpNamespace?: (string|null); + + /** FileOptions swiftPrefix */ + swiftPrefix?: (string|null); + + /** FileOptions phpClassPrefix */ + phpClassPrefix?: (string|null); + + /** FileOptions phpNamespace */ + phpNamespace?: (string|null); + + /** FileOptions phpMetadataNamespace */ + phpMetadataNamespace?: (string|null); + + /** FileOptions rubyPackage */ + rubyPackage?: (string|null); + + /** FileOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FileOptions .google.api.resourceDefinition */ + ".google.api.resourceDefinition"?: (google.api.IResourceDescriptor[]|null); + } + + /** Represents a FileOptions. */ + class FileOptions implements IFileOptions { + + /** + * Constructs a new FileOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFileOptions); + + /** FileOptions javaPackage. */ + public javaPackage: string; + + /** FileOptions javaOuterClassname. */ + public javaOuterClassname: string; + + /** FileOptions javaMultipleFiles. */ + public javaMultipleFiles: boolean; + + /** FileOptions javaGenerateEqualsAndHash. */ + public javaGenerateEqualsAndHash: boolean; + + /** FileOptions javaStringCheckUtf8. */ + public javaStringCheckUtf8: boolean; + + /** FileOptions optimizeFor. */ + public optimizeFor: (google.protobuf.FileOptions.OptimizeMode|keyof typeof google.protobuf.FileOptions.OptimizeMode); + + /** FileOptions goPackage. */ + public goPackage: string; + + /** FileOptions ccGenericServices. */ + public ccGenericServices: boolean; + + /** FileOptions javaGenericServices. */ + public javaGenericServices: boolean; + + /** FileOptions pyGenericServices. */ + public pyGenericServices: boolean; + + /** FileOptions deprecated. */ + public deprecated: boolean; + + /** FileOptions ccEnableArenas. */ + public ccEnableArenas: boolean; + + /** FileOptions objcClassPrefix. */ + public objcClassPrefix: string; + + /** FileOptions csharpNamespace. */ + public csharpNamespace: string; + + /** FileOptions swiftPrefix. */ + public swiftPrefix: string; + + /** FileOptions phpClassPrefix. */ + public phpClassPrefix: string; + + /** FileOptions phpNamespace. */ + public phpNamespace: string; + + /** FileOptions phpMetadataNamespace. */ + public phpMetadataNamespace: string; + + /** FileOptions rubyPackage. */ + public rubyPackage: string; + + /** FileOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FileOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FileOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FileOptions instance + */ + public static create(properties?: google.protobuf.IFileOptions): google.protobuf.FileOptions; + + /** + * Encodes the specified FileOptions message. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FileOptions message, length delimited. Does not implicitly {@link google.protobuf.FileOptions.verify|verify} messages. + * @param message FileOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFileOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FileOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FileOptions; + + /** + * Decodes a FileOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FileOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FileOptions; + + /** + * Verifies a FileOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FileOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FileOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FileOptions; + + /** + * Creates a plain object from a FileOptions message. Also converts values to other types if specified. + * @param message FileOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FileOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FileOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FileOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FileOptions { + + /** OptimizeMode enum. */ + enum OptimizeMode { + SPEED = 1, + CODE_SIZE = 2, + LITE_RUNTIME = 3 + } + } + + /** Properties of a MessageOptions. */ + interface IMessageOptions { + + /** MessageOptions messageSetWireFormat */ + messageSetWireFormat?: (boolean|null); + + /** MessageOptions noStandardDescriptorAccessor */ + noStandardDescriptorAccessor?: (boolean|null); + + /** MessageOptions deprecated */ + deprecated?: (boolean|null); + + /** MessageOptions mapEntry */ + mapEntry?: (boolean|null); + + /** MessageOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** MessageOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MessageOptions .google.api.resource */ + ".google.api.resource"?: (google.api.IResourceDescriptor|null); + } + + /** Represents a MessageOptions. */ + class MessageOptions implements IMessageOptions { + + /** + * Constructs a new MessageOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMessageOptions); + + /** MessageOptions messageSetWireFormat. */ + public messageSetWireFormat: boolean; + + /** MessageOptions noStandardDescriptorAccessor. */ + public noStandardDescriptorAccessor: boolean; + + /** MessageOptions deprecated. */ + public deprecated: boolean; + + /** MessageOptions mapEntry. */ + public mapEntry: boolean; + + /** MessageOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** MessageOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MessageOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MessageOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MessageOptions instance + */ + public static create(properties?: google.protobuf.IMessageOptions): google.protobuf.MessageOptions; + + /** + * Encodes the specified MessageOptions message. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MessageOptions message, length delimited. Does not implicitly {@link google.protobuf.MessageOptions.verify|verify} messages. + * @param message MessageOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMessageOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MessageOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MessageOptions; + + /** + * Decodes a MessageOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MessageOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MessageOptions; + + /** + * Verifies a MessageOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MessageOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MessageOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MessageOptions; + + /** + * Creates a plain object from a MessageOptions message. Also converts values to other types if specified. + * @param message MessageOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MessageOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MessageOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MessageOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a FieldOptions. */ + interface IFieldOptions { + + /** FieldOptions ctype */ + ctype?: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType|null); + + /** FieldOptions packed */ + packed?: (boolean|null); + + /** FieldOptions jstype */ + jstype?: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType|null); + + /** FieldOptions lazy */ + lazy?: (boolean|null); + + /** FieldOptions unverifiedLazy */ + unverifiedLazy?: (boolean|null); + + /** FieldOptions deprecated */ + deprecated?: (boolean|null); + + /** FieldOptions weak */ + weak?: (boolean|null); + + /** FieldOptions debugRedact */ + debugRedact?: (boolean|null); + + /** FieldOptions retention */ + retention?: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention|null); + + /** FieldOptions targets */ + targets?: (google.protobuf.FieldOptions.OptionTargetType[]|null); + + /** FieldOptions editionDefaults */ + editionDefaults?: (google.protobuf.FieldOptions.IEditionDefault[]|null); + + /** FieldOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** FieldOptions .google.api.fieldBehavior */ + ".google.api.fieldBehavior"?: (google.api.FieldBehavior[]|null); + + /** FieldOptions .google.api.resourceReference */ + ".google.api.resourceReference"?: (google.api.IResourceReference|null); + } + + /** Represents a FieldOptions. */ + class FieldOptions implements IFieldOptions { + + /** + * Constructs a new FieldOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFieldOptions); + + /** FieldOptions ctype. */ + public ctype: (google.protobuf.FieldOptions.CType|keyof typeof google.protobuf.FieldOptions.CType); + + /** FieldOptions packed. */ + public packed: boolean; + + /** FieldOptions jstype. */ + public jstype: (google.protobuf.FieldOptions.JSType|keyof typeof google.protobuf.FieldOptions.JSType); + + /** FieldOptions lazy. */ + public lazy: boolean; + + /** FieldOptions unverifiedLazy. */ + public unverifiedLazy: boolean; + + /** FieldOptions deprecated. */ + public deprecated: boolean; + + /** FieldOptions weak. */ + public weak: boolean; + + /** FieldOptions debugRedact. */ + public debugRedact: boolean; + + /** FieldOptions retention. */ + public retention: (google.protobuf.FieldOptions.OptionRetention|keyof typeof google.protobuf.FieldOptions.OptionRetention); + + /** FieldOptions targets. */ + public targets: google.protobuf.FieldOptions.OptionTargetType[]; + + /** FieldOptions editionDefaults. */ + public editionDefaults: google.protobuf.FieldOptions.IEditionDefault[]; + + /** FieldOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** FieldOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new FieldOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns FieldOptions instance + */ + public static create(properties?: google.protobuf.IFieldOptions): google.protobuf.FieldOptions; + + /** + * Encodes the specified FieldOptions message. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @param message FieldOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFieldOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions; + + /** + * Decodes a FieldOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions; + + /** + * Verifies a FieldOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FieldOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FieldOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions; + + /** + * Creates a plain object from a FieldOptions message. Also converts values to other types if specified. + * @param message FieldOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FieldOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FieldOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FieldOptions { + + /** CType enum. */ + enum CType { + STRING = 0, + CORD = 1, + STRING_PIECE = 2 + } + + /** JSType enum. */ + enum JSType { + JS_NORMAL = 0, + JS_STRING = 1, + JS_NUMBER = 2 + } + + /** OptionRetention enum. */ + enum OptionRetention { + RETENTION_UNKNOWN = 0, + RETENTION_RUNTIME = 1, + RETENTION_SOURCE = 2 + } + + /** OptionTargetType enum. */ + enum OptionTargetType { + TARGET_TYPE_UNKNOWN = 0, + TARGET_TYPE_FILE = 1, + TARGET_TYPE_EXTENSION_RANGE = 2, + TARGET_TYPE_MESSAGE = 3, + TARGET_TYPE_FIELD = 4, + TARGET_TYPE_ONEOF = 5, + TARGET_TYPE_ENUM = 6, + TARGET_TYPE_ENUM_ENTRY = 7, + TARGET_TYPE_SERVICE = 8, + TARGET_TYPE_METHOD = 9 + } + + /** Properties of an EditionDefault. */ + interface IEditionDefault { + + /** EditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** EditionDefault value */ + value?: (string|null); + } + + /** Represents an EditionDefault. */ + class EditionDefault implements IEditionDefault { + + /** + * Constructs a new EditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FieldOptions.IEditionDefault); + + /** EditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** EditionDefault value. */ + public value: string; + + /** + * Creates a new EditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns EditionDefault instance + */ + public static create(properties?: google.protobuf.FieldOptions.IEditionDefault): google.protobuf.FieldOptions.EditionDefault; + + /** + * Encodes the specified EditionDefault message. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.EditionDefault.verify|verify} messages. + * @param message EditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FieldOptions.IEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FieldOptions.EditionDefault; + + /** + * Decodes an EditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FieldOptions.EditionDefault; + + /** + * Verifies an EditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FieldOptions.EditionDefault; + + /** + * Creates a plain object from an EditionDefault message. Also converts values to other types if specified. + * @param message EditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FieldOptions.EditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of an OneofOptions. */ + interface IOneofOptions { + + /** OneofOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an OneofOptions. */ + class OneofOptions implements IOneofOptions { + + /** + * Constructs a new OneofOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IOneofOptions); + + /** OneofOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** OneofOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new OneofOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns OneofOptions instance + */ + public static create(properties?: google.protobuf.IOneofOptions): google.protobuf.OneofOptions; + + /** + * Encodes the specified OneofOptions message. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified OneofOptions message, length delimited. Does not implicitly {@link google.protobuf.OneofOptions.verify|verify} messages. + * @param message OneofOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IOneofOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an OneofOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.OneofOptions; + + /** + * Decodes an OneofOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns OneofOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.OneofOptions; + + /** + * Verifies an OneofOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an OneofOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns OneofOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.OneofOptions; + + /** + * Creates a plain object from an OneofOptions message. Also converts values to other types if specified. + * @param message OneofOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.OneofOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this OneofOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for OneofOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumOptions. */ + interface IEnumOptions { + + /** EnumOptions allowAlias */ + allowAlias?: (boolean|null); + + /** EnumOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumOptions deprecatedLegacyJsonFieldConflicts */ + deprecatedLegacyJsonFieldConflicts?: (boolean|null); + + /** EnumOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumOptions. */ + class EnumOptions implements IEnumOptions { + + /** + * Constructs a new EnumOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumOptions); + + /** EnumOptions allowAlias. */ + public allowAlias: boolean; + + /** EnumOptions deprecated. */ + public deprecated: boolean; + + /** EnumOptions deprecatedLegacyJsonFieldConflicts. */ + public deprecatedLegacyJsonFieldConflicts: boolean; + + /** EnumOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumOptions instance + */ + public static create(properties?: google.protobuf.IEnumOptions): google.protobuf.EnumOptions; + + /** + * Encodes the specified EnumOptions message. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumOptions.verify|verify} messages. + * @param message EnumOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumOptions; + + /** + * Decodes an EnumOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumOptions; + + /** + * Verifies an EnumOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumOptions; + + /** + * Creates a plain object from an EnumOptions message. Also converts values to other types if specified. + * @param message EnumOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an EnumValueOptions. */ + interface IEnumValueOptions { + + /** EnumValueOptions deprecated */ + deprecated?: (boolean|null); + + /** EnumValueOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact */ + debugRedact?: (boolean|null); + + /** EnumValueOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + } + + /** Represents an EnumValueOptions. */ + class EnumValueOptions implements IEnumValueOptions { + + /** + * Constructs a new EnumValueOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IEnumValueOptions); + + /** EnumValueOptions deprecated. */ + public deprecated: boolean; + + /** EnumValueOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** EnumValueOptions debugRedact. */ + public debugRedact: boolean; + + /** EnumValueOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new EnumValueOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns EnumValueOptions instance + */ + public static create(properties?: google.protobuf.IEnumValueOptions): google.protobuf.EnumValueOptions; + + /** + * Encodes the specified EnumValueOptions message. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified EnumValueOptions message, length delimited. Does not implicitly {@link google.protobuf.EnumValueOptions.verify|verify} messages. + * @param message EnumValueOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IEnumValueOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.EnumValueOptions; + + /** + * Decodes an EnumValueOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns EnumValueOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.EnumValueOptions; + + /** + * Verifies an EnumValueOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an EnumValueOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns EnumValueOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.EnumValueOptions; + + /** + * Creates a plain object from an EnumValueOptions message. Also converts values to other types if specified. + * @param message EnumValueOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.EnumValueOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this EnumValueOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for EnumValueOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a ServiceOptions. */ + interface IServiceOptions { + + /** ServiceOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated */ + deprecated?: (boolean|null); + + /** ServiceOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** ServiceOptions .google.api.defaultHost */ + ".google.api.defaultHost"?: (string|null); + + /** ServiceOptions .google.api.oauthScopes */ + ".google.api.oauthScopes"?: (string|null); + } + + /** Represents a ServiceOptions. */ + class ServiceOptions implements IServiceOptions { + + /** + * Constructs a new ServiceOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IServiceOptions); + + /** ServiceOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** ServiceOptions deprecated. */ + public deprecated: boolean; + + /** ServiceOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new ServiceOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns ServiceOptions instance + */ + public static create(properties?: google.protobuf.IServiceOptions): google.protobuf.ServiceOptions; + + /** + * Encodes the specified ServiceOptions message. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @param message ServiceOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IServiceOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.ServiceOptions; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.ServiceOptions; + + /** + * Verifies a ServiceOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ServiceOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ServiceOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.ServiceOptions; + + /** + * Creates a plain object from a ServiceOptions message. Also converts values to other types if specified. + * @param message ServiceOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.ServiceOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ServiceOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ServiceOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a MethodOptions. */ + interface IMethodOptions { + + /** MethodOptions deprecated */ + deprecated?: (boolean|null); + + /** MethodOptions idempotencyLevel */ + idempotencyLevel?: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel|null); + + /** MethodOptions features */ + features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption */ + uninterpretedOption?: (google.protobuf.IUninterpretedOption[]|null); + + /** MethodOptions .google.api.http */ + ".google.api.http"?: (google.api.IHttpRule|null); + + /** MethodOptions .google.api.methodSignature */ + ".google.api.methodSignature"?: (string[]|null); + } + + /** Represents a MethodOptions. */ + class MethodOptions implements IMethodOptions { + + /** + * Constructs a new MethodOptions. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IMethodOptions); + + /** MethodOptions deprecated. */ + public deprecated: boolean; + + /** MethodOptions idempotencyLevel. */ + public idempotencyLevel: (google.protobuf.MethodOptions.IdempotencyLevel|keyof typeof google.protobuf.MethodOptions.IdempotencyLevel); + + /** MethodOptions features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** MethodOptions uninterpretedOption. */ + public uninterpretedOption: google.protobuf.IUninterpretedOption[]; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @param [properties] Properties to set + * @returns MethodOptions instance + */ + public static create(properties?: google.protobuf.IMethodOptions): google.protobuf.MethodOptions; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @param message MethodOptions message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IMethodOptions, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.MethodOptions; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.MethodOptions; + + /** + * Verifies a MethodOptions message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns MethodOptions + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.MethodOptions; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @param message MethodOptions + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.MethodOptions, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this MethodOptions to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for MethodOptions + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace MethodOptions { + + /** IdempotencyLevel enum. */ + enum IdempotencyLevel { + IDEMPOTENCY_UNKNOWN = 0, + NO_SIDE_EFFECTS = 1, + IDEMPOTENT = 2 + } + } + + /** Properties of an UninterpretedOption. */ + interface IUninterpretedOption { + + /** UninterpretedOption name */ + name?: (google.protobuf.UninterpretedOption.INamePart[]|null); + + /** UninterpretedOption identifierValue */ + identifierValue?: (string|null); + + /** UninterpretedOption positiveIntValue */ + positiveIntValue?: (number|Long|string|null); + + /** UninterpretedOption negativeIntValue */ + negativeIntValue?: (number|Long|string|null); + + /** UninterpretedOption doubleValue */ + doubleValue?: (number|null); + + /** UninterpretedOption stringValue */ + stringValue?: (Uint8Array|string|null); + + /** UninterpretedOption aggregateValue */ + aggregateValue?: (string|null); + } + + /** Represents an UninterpretedOption. */ + class UninterpretedOption implements IUninterpretedOption { + + /** + * Constructs a new UninterpretedOption. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IUninterpretedOption); + + /** UninterpretedOption name. */ + public name: google.protobuf.UninterpretedOption.INamePart[]; + + /** UninterpretedOption identifierValue. */ + public identifierValue: string; + + /** UninterpretedOption positiveIntValue. */ + public positiveIntValue: (number|Long|string); + + /** UninterpretedOption negativeIntValue. */ + public negativeIntValue: (number|Long|string); + + /** UninterpretedOption doubleValue. */ + public doubleValue: number; + + /** UninterpretedOption stringValue. */ + public stringValue: (Uint8Array|string); + + /** UninterpretedOption aggregateValue. */ + public aggregateValue: string; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @param [properties] Properties to set + * @returns UninterpretedOption instance + */ + public static create(properties?: google.protobuf.IUninterpretedOption): google.protobuf.UninterpretedOption; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @param message UninterpretedOption message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IUninterpretedOption, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption; + + /** + * Verifies an UninterpretedOption message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns UninterpretedOption + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @param message UninterpretedOption + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this UninterpretedOption to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for UninterpretedOption + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace UninterpretedOption { + + /** Properties of a NamePart. */ + interface INamePart { + + /** NamePart namePart */ + namePart: string; + + /** NamePart isExtension */ + isExtension: boolean; + } + + /** Represents a NamePart. */ + class NamePart implements INamePart { + + /** + * Constructs a new NamePart. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.UninterpretedOption.INamePart); + + /** NamePart namePart. */ + public namePart: string; + + /** NamePart isExtension. */ + public isExtension: boolean; + + /** + * Creates a new NamePart instance using the specified properties. + * @param [properties] Properties to set + * @returns NamePart instance + */ + public static create(properties?: google.protobuf.UninterpretedOption.INamePart): google.protobuf.UninterpretedOption.NamePart; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @param message NamePart message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.UninterpretedOption.INamePart, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.UninterpretedOption.NamePart; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.UninterpretedOption.NamePart; + + /** + * Verifies a NamePart message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns NamePart + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.UninterpretedOption.NamePart; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @param message NamePart + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.UninterpretedOption.NamePart, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this NamePart to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for NamePart + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a FeatureSet. */ + interface IFeatureSet { + + /** FeatureSet fieldPresence */ + fieldPresence?: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence|null); + + /** FeatureSet enumType */ + enumType?: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType|null); + + /** FeatureSet repeatedFieldEncoding */ + repeatedFieldEncoding?: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding|null); + + /** FeatureSet utf8Validation */ + utf8Validation?: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation|null); + + /** FeatureSet messageEncoding */ + messageEncoding?: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding|null); + + /** FeatureSet jsonFormat */ + jsonFormat?: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat|null); + } + + /** Represents a FeatureSet. */ + class FeatureSet implements IFeatureSet { + + /** + * Constructs a new FeatureSet. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSet); + + /** FeatureSet fieldPresence. */ + public fieldPresence: (google.protobuf.FeatureSet.FieldPresence|keyof typeof google.protobuf.FeatureSet.FieldPresence); + + /** FeatureSet enumType. */ + public enumType: (google.protobuf.FeatureSet.EnumType|keyof typeof google.protobuf.FeatureSet.EnumType); + + /** FeatureSet repeatedFieldEncoding. */ + public repeatedFieldEncoding: (google.protobuf.FeatureSet.RepeatedFieldEncoding|keyof typeof google.protobuf.FeatureSet.RepeatedFieldEncoding); + + /** FeatureSet utf8Validation. */ + public utf8Validation: (google.protobuf.FeatureSet.Utf8Validation|keyof typeof google.protobuf.FeatureSet.Utf8Validation); + + /** FeatureSet messageEncoding. */ + public messageEncoding: (google.protobuf.FeatureSet.MessageEncoding|keyof typeof google.protobuf.FeatureSet.MessageEncoding); + + /** FeatureSet jsonFormat. */ + public jsonFormat: (google.protobuf.FeatureSet.JsonFormat|keyof typeof google.protobuf.FeatureSet.JsonFormat); + + /** + * Creates a new FeatureSet instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSet instance + */ + public static create(properties?: google.protobuf.IFeatureSet): google.protobuf.FeatureSet; + + /** + * Encodes the specified FeatureSet message. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSet message, length delimited. Does not implicitly {@link google.protobuf.FeatureSet.verify|verify} messages. + * @param message FeatureSet message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSet; + + /** + * Decodes a FeatureSet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSet; + + /** + * Verifies a FeatureSet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSet + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSet; + + /** + * Creates a plain object from a FeatureSet message. Also converts values to other types if specified. + * @param message FeatureSet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSet { + + /** FieldPresence enum. */ + enum FieldPresence { + FIELD_PRESENCE_UNKNOWN = 0, + EXPLICIT = 1, + IMPLICIT = 2, + LEGACY_REQUIRED = 3 + } + + /** EnumType enum. */ + enum EnumType { + ENUM_TYPE_UNKNOWN = 0, + OPEN = 1, + CLOSED = 2 + } + + /** RepeatedFieldEncoding enum. */ + enum RepeatedFieldEncoding { + REPEATED_FIELD_ENCODING_UNKNOWN = 0, + PACKED = 1, + EXPANDED = 2 + } + + /** Utf8Validation enum. */ + enum Utf8Validation { + UTF8_VALIDATION_UNKNOWN = 0, + VERIFY = 2, + NONE = 3 + } + + /** MessageEncoding enum. */ + enum MessageEncoding { + MESSAGE_ENCODING_UNKNOWN = 0, + LENGTH_PREFIXED = 1, + DELIMITED = 2 + } + + /** JsonFormat enum. */ + enum JsonFormat { + JSON_FORMAT_UNKNOWN = 0, + ALLOW = 1, + LEGACY_BEST_EFFORT = 2 + } + } + + /** Properties of a FeatureSetDefaults. */ + interface IFeatureSetDefaults { + + /** FeatureSetDefaults defaults */ + defaults?: (google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]|null); + + /** FeatureSetDefaults minimumEdition */ + minimumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetDefaults maximumEdition */ + maximumEdition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + } + + /** Represents a FeatureSetDefaults. */ + class FeatureSetDefaults implements IFeatureSetDefaults { + + /** + * Constructs a new FeatureSetDefaults. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IFeatureSetDefaults); + + /** FeatureSetDefaults defaults. */ + public defaults: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault[]; + + /** FeatureSetDefaults minimumEdition. */ + public minimumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetDefaults maximumEdition. */ + public maximumEdition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** + * Creates a new FeatureSetDefaults instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetDefaults instance + */ + public static create(properties?: google.protobuf.IFeatureSetDefaults): google.protobuf.FeatureSetDefaults; + + /** + * Encodes the specified FeatureSetDefaults message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetDefaults message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.verify|verify} messages. + * @param message FeatureSetDefaults message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IFeatureSetDefaults, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults; + + /** + * Decodes a FeatureSetDefaults message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults; + + /** + * Verifies a FeatureSetDefaults message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetDefaults message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetDefaults + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults; + + /** + * Creates a plain object from a FeatureSetDefaults message. Also converts values to other types if specified. + * @param message FeatureSetDefaults + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetDefaults to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetDefaults + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace FeatureSetDefaults { + + /** Properties of a FeatureSetEditionDefault. */ + interface IFeatureSetEditionDefault { + + /** FeatureSetEditionDefault edition */ + edition?: (google.protobuf.Edition|keyof typeof google.protobuf.Edition|null); + + /** FeatureSetEditionDefault features */ + features?: (google.protobuf.IFeatureSet|null); + } + + /** Represents a FeatureSetEditionDefault. */ + class FeatureSetEditionDefault implements IFeatureSetEditionDefault { + + /** + * Constructs a new FeatureSetEditionDefault. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault); + + /** FeatureSetEditionDefault edition. */ + public edition: (google.protobuf.Edition|keyof typeof google.protobuf.Edition); + + /** FeatureSetEditionDefault features. */ + public features?: (google.protobuf.IFeatureSet|null); + + /** + * Creates a new FeatureSetEditionDefault instance using the specified properties. + * @param [properties] Properties to set + * @returns FeatureSetEditionDefault instance + */ + public static create(properties?: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Encodes the specified FeatureSetEditionDefault message. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified FeatureSetEditionDefault message, length delimited. Does not implicitly {@link google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault.verify|verify} messages. + * @param message FeatureSetEditionDefault message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.FeatureSetDefaults.IFeatureSetEditionDefault, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Decodes a FeatureSetEditionDefault message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns FeatureSetEditionDefault + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Verifies a FeatureSetEditionDefault message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a FeatureSetEditionDefault message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns FeatureSetEditionDefault + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault; + + /** + * Creates a plain object from a FeatureSetEditionDefault message. Also converts values to other types if specified. + * @param message FeatureSetEditionDefault + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.FeatureSetDefaults.FeatureSetEditionDefault, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this FeatureSetEditionDefault to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for FeatureSetEditionDefault + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a SourceCodeInfo. */ + interface ISourceCodeInfo { + + /** SourceCodeInfo location */ + location?: (google.protobuf.SourceCodeInfo.ILocation[]|null); + } + + /** Represents a SourceCodeInfo. */ + class SourceCodeInfo implements ISourceCodeInfo { + + /** + * Constructs a new SourceCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.ISourceCodeInfo); + + /** SourceCodeInfo location. */ + public location: google.protobuf.SourceCodeInfo.ILocation[]; + + /** + * Creates a new SourceCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns SourceCodeInfo instance + */ + public static create(properties?: google.protobuf.ISourceCodeInfo): google.protobuf.SourceCodeInfo; + + /** + * Encodes the specified SourceCodeInfo message. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SourceCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.verify|verify} messages. + * @param message SourceCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.ISourceCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo; + + /** + * Verifies a SourceCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SourceCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @param message SourceCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SourceCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SourceCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SourceCodeInfo { + + /** Properties of a Location. */ + interface ILocation { + + /** Location path */ + path?: (number[]|null); + + /** Location span */ + span?: (number[]|null); + + /** Location leadingComments */ + leadingComments?: (string|null); + + /** Location trailingComments */ + trailingComments?: (string|null); + + /** Location leadingDetachedComments */ + leadingDetachedComments?: (string[]|null); + } + + /** Represents a Location. */ + class Location implements ILocation { + + /** + * Constructs a new Location. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.SourceCodeInfo.ILocation); + + /** Location path. */ + public path: number[]; + + /** Location span. */ + public span: number[]; + + /** Location leadingComments. */ + public leadingComments: string; + + /** Location trailingComments. */ + public trailingComments: string; + + /** Location leadingDetachedComments. */ + public leadingDetachedComments: string[]; + + /** + * Creates a new Location instance using the specified properties. + * @param [properties] Properties to set + * @returns Location instance + */ + public static create(properties?: google.protobuf.SourceCodeInfo.ILocation): google.protobuf.SourceCodeInfo.Location; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @param message Location message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.SourceCodeInfo.ILocation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Location message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.SourceCodeInfo.Location; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.SourceCodeInfo.Location; + + /** + * Verifies a Location message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Location + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.SourceCodeInfo.Location; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @param message Location + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.SourceCodeInfo.Location, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Location to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Location + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a GeneratedCodeInfo. */ + interface IGeneratedCodeInfo { + + /** GeneratedCodeInfo annotation */ + annotation?: (google.protobuf.GeneratedCodeInfo.IAnnotation[]|null); + } + + /** Represents a GeneratedCodeInfo. */ + class GeneratedCodeInfo implements IGeneratedCodeInfo { + + /** + * Constructs a new GeneratedCodeInfo. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IGeneratedCodeInfo); + + /** GeneratedCodeInfo annotation. */ + public annotation: google.protobuf.GeneratedCodeInfo.IAnnotation[]; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @param [properties] Properties to set + * @returns GeneratedCodeInfo instance + */ + public static create(properties?: google.protobuf.IGeneratedCodeInfo): google.protobuf.GeneratedCodeInfo; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @param message GeneratedCodeInfo message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IGeneratedCodeInfo, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo; + + /** + * Verifies a GeneratedCodeInfo message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns GeneratedCodeInfo + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @param message GeneratedCodeInfo + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace GeneratedCodeInfo { + + /** Properties of an Annotation. */ + interface IAnnotation { + + /** Annotation path */ + path?: (number[]|null); + + /** Annotation sourceFile */ + sourceFile?: (string|null); + + /** Annotation begin */ + begin?: (number|null); + + /** Annotation end */ + end?: (number|null); + + /** Annotation semantic */ + semantic?: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null); + } + + /** Represents an Annotation. */ + class Annotation implements IAnnotation { + + /** + * Constructs a new Annotation. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation); + + /** Annotation path. */ + public path: number[]; + + /** Annotation sourceFile. */ + public sourceFile: string; + + /** Annotation begin. */ + public begin: number; + + /** Annotation end. */ + public end: number; + + /** Annotation semantic. */ + public semantic: (google.protobuf.GeneratedCodeInfo.Annotation.Semantic|keyof typeof google.protobuf.GeneratedCodeInfo.Annotation.Semantic); + + /** + * Creates a new Annotation instance using the specified properties. + * @param [properties] Properties to set + * @returns Annotation instance + */ + public static create(properties?: google.protobuf.GeneratedCodeInfo.IAnnotation): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @param message Annotation message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.GeneratedCodeInfo.IAnnotation, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Verifies an Annotation message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Annotation + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.GeneratedCodeInfo.Annotation; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @param message Annotation + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.GeneratedCodeInfo.Annotation, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Annotation to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Annotation + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace Annotation { + + /** Semantic enum. */ + enum Semantic { + NONE = 0, + SET = 1, + ALIAS = 2 + } + } + } + + /** Properties of a Duration. */ + interface IDuration { + + /** Duration seconds */ + seconds?: (number|Long|string|null); + + /** Duration nanos */ + nanos?: (number|null); + } + + /** Represents a Duration. */ + class Duration implements IDuration { + + /** + * Constructs a new Duration. + * @param [properties] Properties to set + */ + constructor(properties?: google.protobuf.IDuration); + + /** Duration seconds. */ + public seconds: (number|Long|string); + + /** Duration nanos. */ + public nanos: number; + + /** + * Creates a new Duration instance using the specified properties. + * @param [properties] Properties to set + * @returns Duration instance + */ + public static create(properties?: google.protobuf.IDuration): google.protobuf.Duration; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @param message Duration message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.protobuf.IDuration, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.protobuf.Duration; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.protobuf.Duration; + + /** + * Verifies a Duration message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Duration + */ + public static fromObject(object: { [k: string]: any }): google.protobuf.Duration; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @param message Duration + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.protobuf.Duration, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Duration to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Duration + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of an 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; + } + } +} diff --git a/packages/google-marketingplatform-admin/protos/protos.js b/packages/google-marketingplatform-admin/protos/protos.js new file mode 100644 index 00000000000..255741d8a5a --- /dev/null +++ b/packages/google-marketingplatform-admin/protos/protos.js @@ -0,0 +1,20455 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +/*eslint-disable block-scoped-var, id-length, no-control-regex, no-magic-numbers, no-prototype-builtins, no-redeclare, no-shadow, no-var, sort-vars*/ +(function(global, factory) { /* global define, require, module */ + + /* AMD */ if (typeof define === 'function' && define.amd) + define(["protobufjs/minimal"], factory); + + /* CommonJS */ else if (typeof require === 'function' && typeof module === 'object' && module && module.exports) + module.exports = factory(require("google-gax/build/src/protobuf").protobufMinimal); + +})(this, function($protobuf) { + "use strict"; + + // Common aliases + var $Reader = $protobuf.Reader, $Writer = $protobuf.Writer, $util = $protobuf.util; + + // Exported root namespace + var $root = $protobuf.roots._google_ads_marketing_platform_admin_protos || ($protobuf.roots._google_ads_marketing_platform_admin_protos = {}); + + $root.google = (function() { + + /** + * Namespace google. + * @exports google + * @namespace + */ + var google = {}; + + google.marketingplatform = (function() { + + /** + * Namespace marketingplatform. + * @memberof google + * @namespace + */ + var marketingplatform = {}; + + marketingplatform.admin = (function() { + + /** + * Namespace admin. + * @memberof google.marketingplatform + * @namespace + */ + var admin = {}; + + admin.v1alpha = (function() { + + /** + * Namespace v1alpha. + * @memberof google.marketingplatform.admin + * @namespace + */ + var v1alpha = {}; + + v1alpha.MarketingplatformAdminService = (function() { + + /** + * Constructs a new MarketingplatformAdminService service. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a MarketingplatformAdminService + * @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 MarketingplatformAdminService(rpcImpl, requestDelimited, responseDelimited) { + $protobuf.rpc.Service.call(this, rpcImpl, requestDelimited, responseDelimited); + } + + (MarketingplatformAdminService.prototype = Object.create($protobuf.rpc.Service.prototype)).constructor = MarketingplatformAdminService; + + /** + * Creates new MarketingplatformAdminService service using the specified rpc implementation. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @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 {MarketingplatformAdminService} RPC service. Useful where requests and/or responses are streamed. + */ + MarketingplatformAdminService.create = function create(rpcImpl, requestDelimited, responseDelimited) { + return new this(rpcImpl, requestDelimited, responseDelimited); + }; + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|getOrganization}. + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @typedef GetOrganizationCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.marketingplatform.admin.v1alpha.Organization} [response] Organization + */ + + /** + * Calls GetOrganization. + * @function getOrganization + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.IGetOrganizationRequest} request GetOrganizationRequest message or plain object + * @param {google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.GetOrganizationCallback} callback Node-style callback called with the error, if any, and Organization + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingplatformAdminService.prototype.getOrganization = function getOrganization(request, callback) { + return this.rpcCall(getOrganization, $root.google.marketingplatform.admin.v1alpha.GetOrganizationRequest, $root.google.marketingplatform.admin.v1alpha.Organization, request, callback); + }, "name", { value: "GetOrganization" }); + + /** + * Calls GetOrganization. + * @function getOrganization + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.IGetOrganizationRequest} request GetOrganizationRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|listAnalyticsAccountLinks}. + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @typedef ListAnalyticsAccountLinksCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse} [response] ListAnalyticsAccountLinksResponse + */ + + /** + * Calls ListAnalyticsAccountLinks. + * @function listAnalyticsAccountLinks + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest} request ListAnalyticsAccountLinksRequest message or plain object + * @param {google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.ListAnalyticsAccountLinksCallback} callback Node-style callback called with the error, if any, and ListAnalyticsAccountLinksResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingplatformAdminService.prototype.listAnalyticsAccountLinks = function listAnalyticsAccountLinks(request, callback) { + return this.rpcCall(listAnalyticsAccountLinks, $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest, $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse, request, callback); + }, "name", { value: "ListAnalyticsAccountLinks" }); + + /** + * Calls ListAnalyticsAccountLinks. + * @function listAnalyticsAccountLinks + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest} request ListAnalyticsAccountLinksRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|createAnalyticsAccountLink}. + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @typedef CreateAnalyticsAccountLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} [response] AnalyticsAccountLink + */ + + /** + * Calls CreateAnalyticsAccountLink. + * @function createAnalyticsAccountLink + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest} request CreateAnalyticsAccountLinkRequest message or plain object + * @param {google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.CreateAnalyticsAccountLinkCallback} callback Node-style callback called with the error, if any, and AnalyticsAccountLink + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingplatformAdminService.prototype.createAnalyticsAccountLink = function createAnalyticsAccountLink(request, callback) { + return this.rpcCall(createAnalyticsAccountLink, $root.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest, $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink, request, callback); + }, "name", { value: "CreateAnalyticsAccountLink" }); + + /** + * Calls CreateAnalyticsAccountLink. + * @function createAnalyticsAccountLink + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest} request CreateAnalyticsAccountLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|deleteAnalyticsAccountLink}. + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @typedef DeleteAnalyticsAccountLinkCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.protobuf.Empty} [response] Empty + */ + + /** + * Calls DeleteAnalyticsAccountLink. + * @function deleteAnalyticsAccountLink + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest} request DeleteAnalyticsAccountLinkRequest message or plain object + * @param {google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.DeleteAnalyticsAccountLinkCallback} callback Node-style callback called with the error, if any, and Empty + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingplatformAdminService.prototype.deleteAnalyticsAccountLink = function deleteAnalyticsAccountLink(request, callback) { + return this.rpcCall(deleteAnalyticsAccountLink, $root.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest, $root.google.protobuf.Empty, request, callback); + }, "name", { value: "DeleteAnalyticsAccountLink" }); + + /** + * Calls DeleteAnalyticsAccountLink. + * @function deleteAnalyticsAccountLink + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest} request DeleteAnalyticsAccountLinkRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + /** + * Callback as used by {@link google.marketingplatform.admin.v1alpha.MarketingplatformAdminService|setPropertyServiceLevel}. + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @typedef SetPropertyServiceLevelCallback + * @type {function} + * @param {Error|null} error Error, if any + * @param {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse} [response] SetPropertyServiceLevelResponse + */ + + /** + * Calls SetPropertyServiceLevel. + * @function setPropertyServiceLevel + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest} request SetPropertyServiceLevelRequest message or plain object + * @param {google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.SetPropertyServiceLevelCallback} callback Node-style callback called with the error, if any, and SetPropertyServiceLevelResponse + * @returns {undefined} + * @variation 1 + */ + Object.defineProperty(MarketingplatformAdminService.prototype.setPropertyServiceLevel = function setPropertyServiceLevel(request, callback) { + return this.rpcCall(setPropertyServiceLevel, $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest, $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse, request, callback); + }, "name", { value: "SetPropertyServiceLevel" }); + + /** + * Calls SetPropertyServiceLevel. + * @function setPropertyServiceLevel + * @memberof google.marketingplatform.admin.v1alpha.MarketingplatformAdminService + * @instance + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest} request SetPropertyServiceLevelRequest message or plain object + * @returns {Promise} Promise + * @variation 2 + */ + + return MarketingplatformAdminService; + })(); + + /** + * AnalyticsServiceLevel enum. + * @name google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel + * @enum {number} + * @property {number} ANALYTICS_SERVICE_LEVEL_UNSPECIFIED=0 ANALYTICS_SERVICE_LEVEL_UNSPECIFIED value + * @property {number} ANALYTICS_SERVICE_LEVEL_STANDARD=1 ANALYTICS_SERVICE_LEVEL_STANDARD value + * @property {number} ANALYTICS_SERVICE_LEVEL_360=2 ANALYTICS_SERVICE_LEVEL_360 value + */ + v1alpha.AnalyticsServiceLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED"] = 0; + values[valuesById[1] = "ANALYTICS_SERVICE_LEVEL_STANDARD"] = 1; + values[valuesById[2] = "ANALYTICS_SERVICE_LEVEL_360"] = 2; + return values; + })(); + + v1alpha.GetOrganizationRequest = (function() { + + /** + * Properties of a GetOrganizationRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @interface IGetOrganizationRequest + * @property {string|null} [name] GetOrganizationRequest name + */ + + /** + * Constructs a new GetOrganizationRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a GetOrganizationRequest. + * @implements IGetOrganizationRequest + * @constructor + * @param {google.marketingplatform.admin.v1alpha.IGetOrganizationRequest=} [properties] Properties to set + */ + function GetOrganizationRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GetOrganizationRequest name. + * @member {string} name + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @instance + */ + GetOrganizationRequest.prototype.name = ""; + + /** + * Creates a new GetOrganizationRequest instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IGetOrganizationRequest=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.GetOrganizationRequest} GetOrganizationRequest instance + */ + GetOrganizationRequest.create = function create(properties) { + return new GetOrganizationRequest(properties); + }; + + /** + * Encodes the specified GetOrganizationRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.GetOrganizationRequest.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IGetOrganizationRequest} message GetOrganizationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOrganizationRequest.encode = function encode(message, writer) { + 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 GetOrganizationRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.GetOrganizationRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IGetOrganizationRequest} message GetOrganizationRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GetOrganizationRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GetOrganizationRequest message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.GetOrganizationRequest} GetOrganizationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOrganizationRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.GetOrganizationRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GetOrganizationRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.GetOrganizationRequest} GetOrganizationRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GetOrganizationRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GetOrganizationRequest message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GetOrganizationRequest.verify = function verify(message) { + if (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 GetOrganizationRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.GetOrganizationRequest} GetOrganizationRequest + */ + GetOrganizationRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.GetOrganizationRequest) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.GetOrganizationRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a GetOrganizationRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.GetOrganizationRequest} message GetOrganizationRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GetOrganizationRequest.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 GetOrganizationRequest to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @instance + * @returns {Object.} JSON object + */ + GetOrganizationRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GetOrganizationRequest + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.GetOrganizationRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GetOrganizationRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.GetOrganizationRequest"; + }; + + return GetOrganizationRequest; + })(); + + v1alpha.ListAnalyticsAccountLinksRequest = (function() { + + /** + * Properties of a ListAnalyticsAccountLinksRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @interface IListAnalyticsAccountLinksRequest + * @property {string|null} [parent] ListAnalyticsAccountLinksRequest parent + * @property {number|null} [pageSize] ListAnalyticsAccountLinksRequest pageSize + * @property {string|null} [pageToken] ListAnalyticsAccountLinksRequest pageToken + */ + + /** + * Constructs a new ListAnalyticsAccountLinksRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a ListAnalyticsAccountLinksRequest. + * @implements IListAnalyticsAccountLinksRequest + * @constructor + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest=} [properties] Properties to set + */ + function ListAnalyticsAccountLinksRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAnalyticsAccountLinksRequest parent. + * @member {string} parent + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @instance + */ + ListAnalyticsAccountLinksRequest.prototype.parent = ""; + + /** + * ListAnalyticsAccountLinksRequest pageSize. + * @member {number} pageSize + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @instance + */ + ListAnalyticsAccountLinksRequest.prototype.pageSize = 0; + + /** + * ListAnalyticsAccountLinksRequest pageToken. + * @member {string} pageToken + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @instance + */ + ListAnalyticsAccountLinksRequest.prototype.pageToken = ""; + + /** + * Creates a new ListAnalyticsAccountLinksRequest instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest} ListAnalyticsAccountLinksRequest instance + */ + ListAnalyticsAccountLinksRequest.create = function create(properties) { + return new ListAnalyticsAccountLinksRequest(properties); + }; + + /** + * Encodes the specified ListAnalyticsAccountLinksRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest} message ListAnalyticsAccountLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalyticsAccountLinksRequest.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 ListAnalyticsAccountLinksRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest} message ListAnalyticsAccountLinksRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalyticsAccountLinksRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAnalyticsAccountLinksRequest message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest} ListAnalyticsAccountLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalyticsAccountLinksRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.pageSize = reader.int32(); + break; + } + case 3: { + message.pageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAnalyticsAccountLinksRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest} ListAnalyticsAccountLinksRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalyticsAccountLinksRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAnalyticsAccountLinksRequest message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAnalyticsAccountLinksRequest.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 ListAnalyticsAccountLinksRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest} ListAnalyticsAccountLinksRequest + */ + ListAnalyticsAccountLinksRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest(); + 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 ListAnalyticsAccountLinksRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest} message ListAnalyticsAccountLinksRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAnalyticsAccountLinksRequest.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 ListAnalyticsAccountLinksRequest to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @instance + * @returns {Object.} JSON object + */ + ListAnalyticsAccountLinksRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAnalyticsAccountLinksRequest + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAnalyticsAccountLinksRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest"; + }; + + return ListAnalyticsAccountLinksRequest; + })(); + + v1alpha.ListAnalyticsAccountLinksResponse = (function() { + + /** + * Properties of a ListAnalyticsAccountLinksResponse. + * @memberof google.marketingplatform.admin.v1alpha + * @interface IListAnalyticsAccountLinksResponse + * @property {Array.|null} [analyticsAccountLinks] ListAnalyticsAccountLinksResponse analyticsAccountLinks + * @property {string|null} [nextPageToken] ListAnalyticsAccountLinksResponse nextPageToken + */ + + /** + * Constructs a new ListAnalyticsAccountLinksResponse. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a ListAnalyticsAccountLinksResponse. + * @implements IListAnalyticsAccountLinksResponse + * @constructor + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse=} [properties] Properties to set + */ + function ListAnalyticsAccountLinksResponse(properties) { + this.analyticsAccountLinks = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ListAnalyticsAccountLinksResponse analyticsAccountLinks. + * @member {Array.} analyticsAccountLinks + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @instance + */ + ListAnalyticsAccountLinksResponse.prototype.analyticsAccountLinks = $util.emptyArray; + + /** + * ListAnalyticsAccountLinksResponse nextPageToken. + * @member {string} nextPageToken + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @instance + */ + ListAnalyticsAccountLinksResponse.prototype.nextPageToken = ""; + + /** + * Creates a new ListAnalyticsAccountLinksResponse instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse} ListAnalyticsAccountLinksResponse instance + */ + ListAnalyticsAccountLinksResponse.create = function create(properties) { + return new ListAnalyticsAccountLinksResponse(properties); + }; + + /** + * Encodes the specified ListAnalyticsAccountLinksResponse message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse} message ListAnalyticsAccountLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalyticsAccountLinksResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analyticsAccountLinks != null && message.analyticsAccountLinks.length) + for (var i = 0; i < message.analyticsAccountLinks.length; ++i) + $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.encode(message.analyticsAccountLinks[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 ListAnalyticsAccountLinksResponse message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse} message ListAnalyticsAccountLinksResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ListAnalyticsAccountLinksResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ListAnalyticsAccountLinksResponse message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse} ListAnalyticsAccountLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalyticsAccountLinksResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.analyticsAccountLinks && message.analyticsAccountLinks.length)) + message.analyticsAccountLinks = []; + message.analyticsAccountLinks.push($root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.decode(reader, reader.uint32())); + break; + } + case 2: { + message.nextPageToken = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ListAnalyticsAccountLinksResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse} ListAnalyticsAccountLinksResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ListAnalyticsAccountLinksResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ListAnalyticsAccountLinksResponse message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ListAnalyticsAccountLinksResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analyticsAccountLinks != null && message.hasOwnProperty("analyticsAccountLinks")) { + if (!Array.isArray(message.analyticsAccountLinks)) + return "analyticsAccountLinks: array expected"; + for (var i = 0; i < message.analyticsAccountLinks.length; ++i) { + var error = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.verify(message.analyticsAccountLinks[i]); + if (error) + return "analyticsAccountLinks." + error; + } + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + if (!$util.isString(message.nextPageToken)) + return "nextPageToken: string expected"; + return null; + }; + + /** + * Creates a ListAnalyticsAccountLinksResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse} ListAnalyticsAccountLinksResponse + */ + ListAnalyticsAccountLinksResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse(); + if (object.analyticsAccountLinks) { + if (!Array.isArray(object.analyticsAccountLinks)) + throw TypeError(".google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse.analyticsAccountLinks: array expected"); + message.analyticsAccountLinks = []; + for (var i = 0; i < object.analyticsAccountLinks.length; ++i) { + if (typeof object.analyticsAccountLinks[i] !== "object") + throw TypeError(".google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse.analyticsAccountLinks: object expected"); + message.analyticsAccountLinks[i] = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.fromObject(object.analyticsAccountLinks[i]); + } + } + if (object.nextPageToken != null) + message.nextPageToken = String(object.nextPageToken); + return message; + }; + + /** + * Creates a plain object from a ListAnalyticsAccountLinksResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse} message ListAnalyticsAccountLinksResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ListAnalyticsAccountLinksResponse.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.analyticsAccountLinks = []; + if (options.defaults) + object.nextPageToken = ""; + if (message.analyticsAccountLinks && message.analyticsAccountLinks.length) { + object.analyticsAccountLinks = []; + for (var j = 0; j < message.analyticsAccountLinks.length; ++j) + object.analyticsAccountLinks[j] = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.toObject(message.analyticsAccountLinks[j], options); + } + if (message.nextPageToken != null && message.hasOwnProperty("nextPageToken")) + object.nextPageToken = message.nextPageToken; + return object; + }; + + /** + * Converts this ListAnalyticsAccountLinksResponse to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @instance + * @returns {Object.} JSON object + */ + ListAnalyticsAccountLinksResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ListAnalyticsAccountLinksResponse + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ListAnalyticsAccountLinksResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse"; + }; + + return ListAnalyticsAccountLinksResponse; + })(); + + v1alpha.CreateAnalyticsAccountLinkRequest = (function() { + + /** + * Properties of a CreateAnalyticsAccountLinkRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @interface ICreateAnalyticsAccountLinkRequest + * @property {string|null} [parent] CreateAnalyticsAccountLinkRequest parent + * @property {google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink|null} [analyticsAccountLink] CreateAnalyticsAccountLinkRequest analyticsAccountLink + */ + + /** + * Constructs a new CreateAnalyticsAccountLinkRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a CreateAnalyticsAccountLinkRequest. + * @implements ICreateAnalyticsAccountLinkRequest + * @constructor + * @param {google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest=} [properties] Properties to set + */ + function CreateAnalyticsAccountLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CreateAnalyticsAccountLinkRequest parent. + * @member {string} parent + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @instance + */ + CreateAnalyticsAccountLinkRequest.prototype.parent = ""; + + /** + * CreateAnalyticsAccountLinkRequest analyticsAccountLink. + * @member {google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink|null|undefined} analyticsAccountLink + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @instance + */ + CreateAnalyticsAccountLinkRequest.prototype.analyticsAccountLink = null; + + /** + * Creates a new CreateAnalyticsAccountLinkRequest instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest} CreateAnalyticsAccountLinkRequest instance + */ + CreateAnalyticsAccountLinkRequest.create = function create(properties) { + return new CreateAnalyticsAccountLinkRequest(properties); + }; + + /** + * Encodes the specified CreateAnalyticsAccountLinkRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest} message CreateAnalyticsAccountLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalyticsAccountLinkRequest.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.analyticsAccountLink != null && Object.hasOwnProperty.call(message, "analyticsAccountLink")) + $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.encode(message.analyticsAccountLink, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified CreateAnalyticsAccountLinkRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest} message CreateAnalyticsAccountLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CreateAnalyticsAccountLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CreateAnalyticsAccountLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest} CreateAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalyticsAccountLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.parent = reader.string(); + break; + } + case 2: { + message.analyticsAccountLink = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CreateAnalyticsAccountLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest} CreateAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CreateAnalyticsAccountLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CreateAnalyticsAccountLinkRequest message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CreateAnalyticsAccountLinkRequest.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.analyticsAccountLink != null && message.hasOwnProperty("analyticsAccountLink")) { + var error = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.verify(message.analyticsAccountLink); + if (error) + return "analyticsAccountLink." + error; + } + return null; + }; + + /** + * Creates a CreateAnalyticsAccountLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest} CreateAnalyticsAccountLinkRequest + */ + CreateAnalyticsAccountLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest(); + if (object.parent != null) + message.parent = String(object.parent); + if (object.analyticsAccountLink != null) { + if (typeof object.analyticsAccountLink !== "object") + throw TypeError(".google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest.analyticsAccountLink: object expected"); + message.analyticsAccountLink = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.fromObject(object.analyticsAccountLink); + } + return message; + }; + + /** + * Creates a plain object from a CreateAnalyticsAccountLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest} message CreateAnalyticsAccountLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CreateAnalyticsAccountLinkRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.parent = ""; + object.analyticsAccountLink = null; + } + if (message.parent != null && message.hasOwnProperty("parent")) + object.parent = message.parent; + if (message.analyticsAccountLink != null && message.hasOwnProperty("analyticsAccountLink")) + object.analyticsAccountLink = $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.toObject(message.analyticsAccountLink, options); + return object; + }; + + /** + * Converts this CreateAnalyticsAccountLinkRequest to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @instance + * @returns {Object.} JSON object + */ + CreateAnalyticsAccountLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CreateAnalyticsAccountLinkRequest + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CreateAnalyticsAccountLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest"; + }; + + return CreateAnalyticsAccountLinkRequest; + })(); + + v1alpha.DeleteAnalyticsAccountLinkRequest = (function() { + + /** + * Properties of a DeleteAnalyticsAccountLinkRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @interface IDeleteAnalyticsAccountLinkRequest + * @property {string|null} [name] DeleteAnalyticsAccountLinkRequest name + */ + + /** + * Constructs a new DeleteAnalyticsAccountLinkRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a DeleteAnalyticsAccountLinkRequest. + * @implements IDeleteAnalyticsAccountLinkRequest + * @constructor + * @param {google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest=} [properties] Properties to set + */ + function DeleteAnalyticsAccountLinkRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * DeleteAnalyticsAccountLinkRequest name. + * @member {string} name + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @instance + */ + DeleteAnalyticsAccountLinkRequest.prototype.name = ""; + + /** + * Creates a new DeleteAnalyticsAccountLinkRequest instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest} DeleteAnalyticsAccountLinkRequest instance + */ + DeleteAnalyticsAccountLinkRequest.create = function create(properties) { + return new DeleteAnalyticsAccountLinkRequest(properties); + }; + + /** + * Encodes the specified DeleteAnalyticsAccountLinkRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest} message DeleteAnalyticsAccountLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAnalyticsAccountLinkRequest.encode = function encode(message, writer) { + 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 DeleteAnalyticsAccountLinkRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest} message DeleteAnalyticsAccountLinkRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DeleteAnalyticsAccountLinkRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DeleteAnalyticsAccountLinkRequest message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest} DeleteAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAnalyticsAccountLinkRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DeleteAnalyticsAccountLinkRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest} DeleteAnalyticsAccountLinkRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DeleteAnalyticsAccountLinkRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DeleteAnalyticsAccountLinkRequest message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DeleteAnalyticsAccountLinkRequest.verify = function verify(message) { + if (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 DeleteAnalyticsAccountLinkRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest} DeleteAnalyticsAccountLinkRequest + */ + DeleteAnalyticsAccountLinkRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest(); + if (object.name != null) + message.name = String(object.name); + return message; + }; + + /** + * Creates a plain object from a DeleteAnalyticsAccountLinkRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest} message DeleteAnalyticsAccountLinkRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DeleteAnalyticsAccountLinkRequest.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 DeleteAnalyticsAccountLinkRequest to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @instance + * @returns {Object.} JSON object + */ + DeleteAnalyticsAccountLinkRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DeleteAnalyticsAccountLinkRequest + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DeleteAnalyticsAccountLinkRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest"; + }; + + return DeleteAnalyticsAccountLinkRequest; + })(); + + v1alpha.SetPropertyServiceLevelRequest = (function() { + + /** + * Properties of a SetPropertyServiceLevelRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @interface ISetPropertyServiceLevelRequest + * @property {string|null} [analyticsAccountLink] SetPropertyServiceLevelRequest analyticsAccountLink + * @property {string|null} [analyticsProperty] SetPropertyServiceLevelRequest analyticsProperty + * @property {google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel|null} [serviceLevel] SetPropertyServiceLevelRequest serviceLevel + */ + + /** + * Constructs a new SetPropertyServiceLevelRequest. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a SetPropertyServiceLevelRequest. + * @implements ISetPropertyServiceLevelRequest + * @constructor + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest=} [properties] Properties to set + */ + function SetPropertyServiceLevelRequest(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SetPropertyServiceLevelRequest analyticsAccountLink. + * @member {string} analyticsAccountLink + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @instance + */ + SetPropertyServiceLevelRequest.prototype.analyticsAccountLink = ""; + + /** + * SetPropertyServiceLevelRequest analyticsProperty. + * @member {string} analyticsProperty + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @instance + */ + SetPropertyServiceLevelRequest.prototype.analyticsProperty = ""; + + /** + * SetPropertyServiceLevelRequest serviceLevel. + * @member {google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel} serviceLevel + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @instance + */ + SetPropertyServiceLevelRequest.prototype.serviceLevel = 0; + + /** + * Creates a new SetPropertyServiceLevelRequest instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest} SetPropertyServiceLevelRequest instance + */ + SetPropertyServiceLevelRequest.create = function create(properties) { + return new SetPropertyServiceLevelRequest(properties); + }; + + /** + * Encodes the specified SetPropertyServiceLevelRequest message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest} message SetPropertyServiceLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPropertyServiceLevelRequest.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.analyticsAccountLink != null && Object.hasOwnProperty.call(message, "analyticsAccountLink")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.analyticsAccountLink); + if (message.analyticsProperty != null && Object.hasOwnProperty.call(message, "analyticsProperty")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.analyticsProperty); + if (message.serviceLevel != null && Object.hasOwnProperty.call(message, "serviceLevel")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.serviceLevel); + return writer; + }; + + /** + * Encodes the specified SetPropertyServiceLevelRequest message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest} message SetPropertyServiceLevelRequest message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPropertyServiceLevelRequest.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPropertyServiceLevelRequest message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest} SetPropertyServiceLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPropertyServiceLevelRequest.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.analyticsAccountLink = reader.string(); + break; + } + case 2: { + message.analyticsProperty = reader.string(); + break; + } + case 3: { + message.serviceLevel = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPropertyServiceLevelRequest message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest} SetPropertyServiceLevelRequest + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPropertyServiceLevelRequest.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPropertyServiceLevelRequest message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPropertyServiceLevelRequest.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.analyticsAccountLink != null && message.hasOwnProperty("analyticsAccountLink")) + if (!$util.isString(message.analyticsAccountLink)) + return "analyticsAccountLink: string expected"; + if (message.analyticsProperty != null && message.hasOwnProperty("analyticsProperty")) + if (!$util.isString(message.analyticsProperty)) + return "analyticsProperty: string expected"; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + switch (message.serviceLevel) { + default: + return "serviceLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates a SetPropertyServiceLevelRequest message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest} SetPropertyServiceLevelRequest + */ + SetPropertyServiceLevelRequest.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest(); + if (object.analyticsAccountLink != null) + message.analyticsAccountLink = String(object.analyticsAccountLink); + if (object.analyticsProperty != null) + message.analyticsProperty = String(object.analyticsProperty); + switch (object.serviceLevel) { + default: + if (typeof object.serviceLevel === "number") { + message.serviceLevel = object.serviceLevel; + break; + } + break; + case "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED": + case 0: + message.serviceLevel = 0; + break; + case "ANALYTICS_SERVICE_LEVEL_STANDARD": + case 1: + message.serviceLevel = 1; + break; + case "ANALYTICS_SERVICE_LEVEL_360": + case 2: + message.serviceLevel = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from a SetPropertyServiceLevelRequest message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest} message SetPropertyServiceLevelRequest + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPropertyServiceLevelRequest.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.analyticsAccountLink = ""; + object.analyticsProperty = ""; + object.serviceLevel = options.enums === String ? "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED" : 0; + } + if (message.analyticsAccountLink != null && message.hasOwnProperty("analyticsAccountLink")) + object.analyticsAccountLink = message.analyticsAccountLink; + if (message.analyticsProperty != null && message.hasOwnProperty("analyticsProperty")) + object.analyticsProperty = message.analyticsProperty; + if (message.serviceLevel != null && message.hasOwnProperty("serviceLevel")) + object.serviceLevel = options.enums === String ? $root.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel[message.serviceLevel] === undefined ? message.serviceLevel : $root.google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel[message.serviceLevel] : message.serviceLevel; + return object; + }; + + /** + * Converts this SetPropertyServiceLevelRequest to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @instance + * @returns {Object.} JSON object + */ + SetPropertyServiceLevelRequest.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPropertyServiceLevelRequest + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPropertyServiceLevelRequest.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest"; + }; + + return SetPropertyServiceLevelRequest; + })(); + + v1alpha.SetPropertyServiceLevelResponse = (function() { + + /** + * Properties of a SetPropertyServiceLevelResponse. + * @memberof google.marketingplatform.admin.v1alpha + * @interface ISetPropertyServiceLevelResponse + */ + + /** + * Constructs a new SetPropertyServiceLevelResponse. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents a SetPropertyServiceLevelResponse. + * @implements ISetPropertyServiceLevelResponse + * @constructor + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse=} [properties] Properties to set + */ + function SetPropertyServiceLevelResponse(properties) { + if (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 SetPropertyServiceLevelResponse instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse} SetPropertyServiceLevelResponse instance + */ + SetPropertyServiceLevelResponse.create = function create(properties) { + return new SetPropertyServiceLevelResponse(properties); + }; + + /** + * Encodes the specified SetPropertyServiceLevelResponse message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse} message SetPropertyServiceLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPropertyServiceLevelResponse.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified SetPropertyServiceLevelResponse message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse} message SetPropertyServiceLevelResponse message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SetPropertyServiceLevelResponse.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SetPropertyServiceLevelResponse message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse} SetPropertyServiceLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPropertyServiceLevelResponse.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SetPropertyServiceLevelResponse message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse} SetPropertyServiceLevelResponse + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SetPropertyServiceLevelResponse.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SetPropertyServiceLevelResponse message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SetPropertyServiceLevelResponse.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates a SetPropertyServiceLevelResponse message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse} SetPropertyServiceLevelResponse + */ + SetPropertyServiceLevelResponse.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse) + return object; + return new $root.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse(); + }; + + /** + * Creates a plain object from a SetPropertyServiceLevelResponse message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse} message SetPropertyServiceLevelResponse + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SetPropertyServiceLevelResponse.toObject = function toObject() { + return {}; + }; + + /** + * Converts this SetPropertyServiceLevelResponse to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @instance + * @returns {Object.} JSON object + */ + SetPropertyServiceLevelResponse.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SetPropertyServiceLevelResponse + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SetPropertyServiceLevelResponse.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse"; + }; + + return SetPropertyServiceLevelResponse; + })(); + + /** + * LinkVerificationState enum. + * @name google.marketingplatform.admin.v1alpha.LinkVerificationState + * @enum {number} + * @property {number} LINK_VERIFICATION_STATE_UNSPECIFIED=0 LINK_VERIFICATION_STATE_UNSPECIFIED value + * @property {number} LINK_VERIFICATION_STATE_VERIFIED=1 LINK_VERIFICATION_STATE_VERIFIED value + * @property {number} LINK_VERIFICATION_STATE_NOT_VERIFIED=2 LINK_VERIFICATION_STATE_NOT_VERIFIED value + */ + v1alpha.LinkVerificationState = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "LINK_VERIFICATION_STATE_UNSPECIFIED"] = 0; + values[valuesById[1] = "LINK_VERIFICATION_STATE_VERIFIED"] = 1; + values[valuesById[2] = "LINK_VERIFICATION_STATE_NOT_VERIFIED"] = 2; + return values; + })(); + + v1alpha.Organization = (function() { + + /** + * Properties of an Organization. + * @memberof google.marketingplatform.admin.v1alpha + * @interface IOrganization + * @property {string|null} [name] Organization name + * @property {string|null} [displayName] Organization displayName + */ + + /** + * Constructs a new Organization. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents an Organization. + * @implements IOrganization + * @constructor + * @param {google.marketingplatform.admin.v1alpha.IOrganization=} [properties] Properties to set + */ + function Organization(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Organization name. + * @member {string} name + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @instance + */ + Organization.prototype.name = ""; + + /** + * Organization displayName. + * @member {string} displayName + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @instance + */ + Organization.prototype.displayName = ""; + + /** + * Creates a new Organization instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {google.marketingplatform.admin.v1alpha.IOrganization=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.Organization} Organization instance + */ + Organization.create = function create(properties) { + return new Organization(properties); + }; + + /** + * Encodes the specified Organization message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.Organization.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {google.marketingplatform.admin.v1alpha.IOrganization} message Organization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Organization.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.displayName); + return writer; + }; + + /** + * Encodes the specified Organization message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.Organization.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {google.marketingplatform.admin.v1alpha.IOrganization} message Organization message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Organization.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Organization message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.Organization} Organization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Organization.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.Organization(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.displayName = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Organization message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.Organization} Organization + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Organization.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Organization message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Organization.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + return null; + }; + + /** + * Creates an Organization message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.Organization} Organization + */ + Organization.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.Organization) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.Organization(); + if (object.name != null) + message.name = String(object.name); + if (object.displayName != null) + message.displayName = String(object.displayName); + return message; + }; + + /** + * Creates a plain object from an Organization message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {google.marketingplatform.admin.v1alpha.Organization} message Organization + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Organization.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.displayName = ""; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + return object; + }; + + /** + * Converts this Organization to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @instance + * @returns {Object.} JSON object + */ + Organization.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Organization + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.Organization + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Organization.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.Organization"; + }; + + return Organization; + })(); + + v1alpha.AnalyticsAccountLink = (function() { + + /** + * Properties of an AnalyticsAccountLink. + * @memberof google.marketingplatform.admin.v1alpha + * @interface IAnalyticsAccountLink + * @property {string|null} [name] AnalyticsAccountLink name + * @property {string|null} [analyticsAccount] AnalyticsAccountLink analyticsAccount + * @property {string|null} [displayName] AnalyticsAccountLink displayName + * @property {google.marketingplatform.admin.v1alpha.LinkVerificationState|null} [linkVerificationState] AnalyticsAccountLink linkVerificationState + */ + + /** + * Constructs a new AnalyticsAccountLink. + * @memberof google.marketingplatform.admin.v1alpha + * @classdesc Represents an AnalyticsAccountLink. + * @implements IAnalyticsAccountLink + * @constructor + * @param {google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink=} [properties] Properties to set + */ + function AnalyticsAccountLink(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * AnalyticsAccountLink name. + * @member {string} name + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @instance + */ + AnalyticsAccountLink.prototype.name = ""; + + /** + * AnalyticsAccountLink analyticsAccount. + * @member {string} analyticsAccount + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @instance + */ + AnalyticsAccountLink.prototype.analyticsAccount = ""; + + /** + * AnalyticsAccountLink displayName. + * @member {string} displayName + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @instance + */ + AnalyticsAccountLink.prototype.displayName = ""; + + /** + * AnalyticsAccountLink linkVerificationState. + * @member {google.marketingplatform.admin.v1alpha.LinkVerificationState} linkVerificationState + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @instance + */ + AnalyticsAccountLink.prototype.linkVerificationState = 0; + + /** + * Creates a new AnalyticsAccountLink instance using the specified properties. + * @function create + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink=} [properties] Properties to set + * @returns {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} AnalyticsAccountLink instance + */ + AnalyticsAccountLink.create = function create(properties) { + return new AnalyticsAccountLink(properties); + }; + + /** + * Encodes the specified AnalyticsAccountLink message. Does not implicitly {@link google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.verify|verify} messages. + * @function encode + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink} message AnalyticsAccountLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyticsAccountLink.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.analyticsAccount != null && Object.hasOwnProperty.call(message, "analyticsAccount")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.analyticsAccount); + if (message.displayName != null && Object.hasOwnProperty.call(message, "displayName")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.displayName); + if (message.linkVerificationState != null && Object.hasOwnProperty.call(message, "linkVerificationState")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.linkVerificationState); + return writer; + }; + + /** + * Encodes the specified AnalyticsAccountLink message, length delimited. Does not implicitly {@link google.marketingplatform.admin.v1alpha.AnalyticsAccountLink.verify|verify} messages. + * @function encodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink} message AnalyticsAccountLink message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + AnalyticsAccountLink.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an AnalyticsAccountLink message from the specified reader or buffer. + * @function decode + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} AnalyticsAccountLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyticsAccountLink.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.analyticsAccount = reader.string(); + break; + } + case 3: { + message.displayName = reader.string(); + break; + } + case 4: { + message.linkVerificationState = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an AnalyticsAccountLink message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} AnalyticsAccountLink + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + AnalyticsAccountLink.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an AnalyticsAccountLink message. + * @function verify + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + AnalyticsAccountLink.verify = function verify(message) { + if (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.analyticsAccount != null && message.hasOwnProperty("analyticsAccount")) + if (!$util.isString(message.analyticsAccount)) + return "analyticsAccount: string expected"; + if (message.displayName != null && message.hasOwnProperty("displayName")) + if (!$util.isString(message.displayName)) + return "displayName: string expected"; + if (message.linkVerificationState != null && message.hasOwnProperty("linkVerificationState")) + switch (message.linkVerificationState) { + default: + return "linkVerificationState: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an AnalyticsAccountLink message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {Object.} object Plain object + * @returns {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} AnalyticsAccountLink + */ + AnalyticsAccountLink.fromObject = function fromObject(object) { + if (object instanceof $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink) + return object; + var message = new $root.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink(); + if (object.name != null) + message.name = String(object.name); + if (object.analyticsAccount != null) + message.analyticsAccount = String(object.analyticsAccount); + if (object.displayName != null) + message.displayName = String(object.displayName); + switch (object.linkVerificationState) { + default: + if (typeof object.linkVerificationState === "number") { + message.linkVerificationState = object.linkVerificationState; + break; + } + break; + case "LINK_VERIFICATION_STATE_UNSPECIFIED": + case 0: + message.linkVerificationState = 0; + break; + case "LINK_VERIFICATION_STATE_VERIFIED": + case 1: + message.linkVerificationState = 1; + break; + case "LINK_VERIFICATION_STATE_NOT_VERIFIED": + case 2: + message.linkVerificationState = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an AnalyticsAccountLink message. Also converts values to other types if specified. + * @function toObject + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} message AnalyticsAccountLink + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + AnalyticsAccountLink.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.analyticsAccount = ""; + object.displayName = ""; + object.linkVerificationState = options.enums === String ? "LINK_VERIFICATION_STATE_UNSPECIFIED" : 0; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.analyticsAccount != null && message.hasOwnProperty("analyticsAccount")) + object.analyticsAccount = message.analyticsAccount; + if (message.displayName != null && message.hasOwnProperty("displayName")) + object.displayName = message.displayName; + if (message.linkVerificationState != null && message.hasOwnProperty("linkVerificationState")) + object.linkVerificationState = options.enums === String ? $root.google.marketingplatform.admin.v1alpha.LinkVerificationState[message.linkVerificationState] === undefined ? message.linkVerificationState : $root.google.marketingplatform.admin.v1alpha.LinkVerificationState[message.linkVerificationState] : message.linkVerificationState; + return object; + }; + + /** + * Converts this AnalyticsAccountLink to JSON. + * @function toJSON + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @instance + * @returns {Object.} JSON object + */ + AnalyticsAccountLink.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for AnalyticsAccountLink + * @function getTypeUrl + * @memberof google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + AnalyticsAccountLink.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.marketingplatform.admin.v1alpha.AnalyticsAccountLink"; + }; + + return AnalyticsAccountLink; + })(); + + return v1alpha; + })(); + + return admin; + })(); + + return marketingplatform; + })(); + + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.Http(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.rules && message.rules.length)) + message.rules = []; + message.rules.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + case 2: { + message.fullyDecodeReservedExpansion = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Http message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.Http + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.Http} Http + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Http.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Http message. + * @function verify + * @memberof google.api.Http + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Http.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.rules != null && message.hasOwnProperty("rules")) { + if (!Array.isArray(message.rules)) + return "rules: array expected"; + for (var i = 0; i < message.rules.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.rules[i]); + if (error) + return "rules." + error; + } + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + if (typeof message.fullyDecodeReservedExpansion !== "boolean") + return "fullyDecodeReservedExpansion: boolean expected"; + return null; + }; + + /** + * Creates a Http message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.Http + * @static + * @param {Object.} object Plain object + * @returns {google.api.Http} Http + */ + Http.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.Http) + return object; + var message = new $root.google.api.Http(); + if (object.rules) { + if (!Array.isArray(object.rules)) + throw TypeError(".google.api.Http.rules: array expected"); + message.rules = []; + for (var i = 0; i < object.rules.length; ++i) { + if (typeof object.rules[i] !== "object") + throw TypeError(".google.api.Http.rules: object expected"); + message.rules[i] = $root.google.api.HttpRule.fromObject(object.rules[i]); + } + } + if (object.fullyDecodeReservedExpansion != null) + message.fullyDecodeReservedExpansion = Boolean(object.fullyDecodeReservedExpansion); + return message; + }; + + /** + * Creates a plain object from a Http message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.Http + * @static + * @param {google.api.Http} message Http + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Http.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.rules = []; + if (options.defaults) + object.fullyDecodeReservedExpansion = false; + if (message.rules && message.rules.length) { + object.rules = []; + for (var j = 0; j < message.rules.length; ++j) + object.rules[j] = $root.google.api.HttpRule.toObject(message.rules[j], options); + } + if (message.fullyDecodeReservedExpansion != null && message.hasOwnProperty("fullyDecodeReservedExpansion")) + object.fullyDecodeReservedExpansion = message.fullyDecodeReservedExpansion; + return object; + }; + + /** + * Converts this Http to JSON. + * @function toJSON + * @memberof google.api.Http + * @instance + * @returns {Object.} JSON object + */ + Http.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Http + * @function getTypeUrl + * @memberof google.api.Http + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Http.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.Http"; + }; + + return Http; + })(); + + api.HttpRule = (function() { + + /** + * Properties of a HttpRule. + * @memberof google.api + * @interface IHttpRule + * @property {string|null} [selector] HttpRule selector + * @property {string|null} [get] HttpRule get + * @property {string|null} [put] HttpRule put + * @property {string|null} [post] HttpRule post + * @property {string|null} ["delete"] HttpRule delete + * @property {string|null} [patch] HttpRule patch + * @property {google.api.ICustomHttpPattern|null} [custom] HttpRule custom + * @property {string|null} [body] HttpRule body + * @property {string|null} [responseBody] HttpRule responseBody + * @property {Array.|null} [additionalBindings] HttpRule additionalBindings + */ + + /** + * Constructs a new HttpRule. + * @memberof google.api + * @classdesc Represents a HttpRule. + * @implements IHttpRule + * @constructor + * @param {google.api.IHttpRule=} [properties] Properties to set + */ + function HttpRule(properties) { + this.additionalBindings = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * HttpRule selector. + * @member {string} selector + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.selector = ""; + + /** + * HttpRule get. + * @member {string|null|undefined} get + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.get = null; + + /** + * HttpRule put. + * @member {string|null|undefined} put + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.put = null; + + /** + * HttpRule post. + * @member {string|null|undefined} post + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.post = null; + + /** + * HttpRule delete. + * @member {string|null|undefined} delete + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype["delete"] = null; + + /** + * HttpRule patch. + * @member {string|null|undefined} patch + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.patch = null; + + /** + * HttpRule custom. + * @member {google.api.ICustomHttpPattern|null|undefined} custom + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.custom = null; + + /** + * HttpRule body. + * @member {string} body + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.body = ""; + + /** + * HttpRule responseBody. + * @member {string} responseBody + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.responseBody = ""; + + /** + * HttpRule additionalBindings. + * @member {Array.} additionalBindings + * @memberof google.api.HttpRule + * @instance + */ + HttpRule.prototype.additionalBindings = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * HttpRule pattern. + * @member {"get"|"put"|"post"|"delete"|"patch"|"custom"|undefined} pattern + * @memberof google.api.HttpRule + * @instance + */ + Object.defineProperty(HttpRule.prototype, "pattern", { + get: $util.oneOfGetter($oneOfFields = ["get", "put", "post", "delete", "patch", "custom"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new HttpRule instance using the specified properties. + * @function create + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule=} [properties] Properties to set + * @returns {google.api.HttpRule} HttpRule instance + */ + HttpRule.create = function create(properties) { + return new HttpRule(properties); + }; + + /** + * Encodes the specified HttpRule message. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encode + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.selector != null && Object.hasOwnProperty.call(message, "selector")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.selector); + if (message.get != null && Object.hasOwnProperty.call(message, "get")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.get); + if (message.put != null && Object.hasOwnProperty.call(message, "put")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.put); + if (message.post != null && Object.hasOwnProperty.call(message, "post")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.post); + if (message["delete"] != null && Object.hasOwnProperty.call(message, "delete")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message["delete"]); + if (message.patch != null && Object.hasOwnProperty.call(message, "patch")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.patch); + if (message.body != null && Object.hasOwnProperty.call(message, "body")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.body); + if (message.custom != null && Object.hasOwnProperty.call(message, "custom")) + $root.google.api.CustomHttpPattern.encode(message.custom, writer.uint32(/* id 8, wireType 2 =*/66).fork()).ldelim(); + if (message.additionalBindings != null && message.additionalBindings.length) + for (var i = 0; i < message.additionalBindings.length; ++i) + $root.google.api.HttpRule.encode(message.additionalBindings[i], writer.uint32(/* id 11, wireType 2 =*/90).fork()).ldelim(); + if (message.responseBody != null && Object.hasOwnProperty.call(message, "responseBody")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.responseBody); + return writer; + }; + + /** + * Encodes the specified HttpRule message, length delimited. Does not implicitly {@link google.api.HttpRule.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {google.api.IHttpRule} message HttpRule message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + HttpRule.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer. + * @function decode + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.HttpRule(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.selector = reader.string(); + break; + } + case 2: { + message.get = reader.string(); + break; + } + case 3: { + message.put = reader.string(); + break; + } + case 4: { + message.post = reader.string(); + break; + } + case 5: { + message["delete"] = reader.string(); + break; + } + case 6: { + message.patch = reader.string(); + break; + } + case 8: { + message.custom = $root.google.api.CustomHttpPattern.decode(reader, reader.uint32()); + break; + } + case 7: { + message.body = reader.string(); + break; + } + case 12: { + message.responseBody = reader.string(); + break; + } + case 11: { + if (!(message.additionalBindings && message.additionalBindings.length)) + message.additionalBindings = []; + message.additionalBindings.push($root.google.api.HttpRule.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a HttpRule message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.HttpRule + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.HttpRule} HttpRule + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + HttpRule.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a HttpRule message. + * @function verify + * @memberof google.api.HttpRule + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + HttpRule.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.selector != null && message.hasOwnProperty("selector")) + if (!$util.isString(message.selector)) + return "selector: string expected"; + if (message.get != null && message.hasOwnProperty("get")) { + properties.pattern = 1; + if (!$util.isString(message.get)) + return "get: string expected"; + } + if (message.put != null && message.hasOwnProperty("put")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.put)) + return "put: string expected"; + } + if (message.post != null && message.hasOwnProperty("post")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.post)) + return "post: string expected"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message["delete"])) + return "delete: string expected"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + if (!$util.isString(message.patch)) + return "patch: string expected"; + } + if (message.custom != null && message.hasOwnProperty("custom")) { + if (properties.pattern === 1) + return "pattern: multiple values"; + properties.pattern = 1; + { + var error = $root.google.api.CustomHttpPattern.verify(message.custom); + if (error) + return "custom." + error; + } + } + if (message.body != null && message.hasOwnProperty("body")) + if (!$util.isString(message.body)) + return "body: string expected"; + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + if (!$util.isString(message.responseBody)) + return "responseBody: string expected"; + if (message.additionalBindings != null && message.hasOwnProperty("additionalBindings")) { + if (!Array.isArray(message.additionalBindings)) + return "additionalBindings: array expected"; + for (var i = 0; i < message.additionalBindings.length; ++i) { + var error = $root.google.api.HttpRule.verify(message.additionalBindings[i]); + if (error) + return "additionalBindings." + error; + } + } + return null; + }; + + /** + * Creates a HttpRule message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.HttpRule + * @static + * @param {Object.} object Plain object + * @returns {google.api.HttpRule} HttpRule + */ + HttpRule.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.HttpRule) + return object; + var message = new $root.google.api.HttpRule(); + if (object.selector != null) + message.selector = String(object.selector); + if (object.get != null) + message.get = String(object.get); + if (object.put != null) + message.put = String(object.put); + if (object.post != null) + message.post = String(object.post); + if (object["delete"] != null) + message["delete"] = String(object["delete"]); + if (object.patch != null) + message.patch = String(object.patch); + if (object.custom != null) { + if (typeof object.custom !== "object") + throw TypeError(".google.api.HttpRule.custom: object expected"); + message.custom = $root.google.api.CustomHttpPattern.fromObject(object.custom); + } + if (object.body != null) + message.body = String(object.body); + if (object.responseBody != null) + message.responseBody = String(object.responseBody); + if (object.additionalBindings) { + if (!Array.isArray(object.additionalBindings)) + throw TypeError(".google.api.HttpRule.additionalBindings: array expected"); + message.additionalBindings = []; + for (var i = 0; i < object.additionalBindings.length; ++i) { + if (typeof object.additionalBindings[i] !== "object") + throw TypeError(".google.api.HttpRule.additionalBindings: object expected"); + message.additionalBindings[i] = $root.google.api.HttpRule.fromObject(object.additionalBindings[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a HttpRule message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.HttpRule + * @static + * @param {google.api.HttpRule} message HttpRule + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + HttpRule.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.additionalBindings = []; + if (options.defaults) { + object.selector = ""; + object.body = ""; + object.responseBody = ""; + } + if (message.selector != null && message.hasOwnProperty("selector")) + object.selector = message.selector; + if (message.get != null && message.hasOwnProperty("get")) { + object.get = message.get; + if (options.oneofs) + object.pattern = "get"; + } + if (message.put != null && message.hasOwnProperty("put")) { + object.put = message.put; + if (options.oneofs) + object.pattern = "put"; + } + if (message.post != null && message.hasOwnProperty("post")) { + object.post = message.post; + if (options.oneofs) + object.pattern = "post"; + } + if (message["delete"] != null && message.hasOwnProperty("delete")) { + object["delete"] = message["delete"]; + if (options.oneofs) + object.pattern = "delete"; + } + if (message.patch != null && message.hasOwnProperty("patch")) { + object.patch = message.patch; + if (options.oneofs) + object.pattern = "patch"; + } + if (message.body != null && message.hasOwnProperty("body")) + object.body = message.body; + if (message.custom != null && message.hasOwnProperty("custom")) { + object.custom = $root.google.api.CustomHttpPattern.toObject(message.custom, options); + if (options.oneofs) + object.pattern = "custom"; + } + if (message.additionalBindings && message.additionalBindings.length) { + object.additionalBindings = []; + for (var j = 0; j < message.additionalBindings.length; ++j) + object.additionalBindings[j] = $root.google.api.HttpRule.toObject(message.additionalBindings[j], options); + } + if (message.responseBody != null && message.hasOwnProperty("responseBody")) + object.responseBody = message.responseBody; + return object; + }; + + /** + * Converts this HttpRule to JSON. + * @function toJSON + * @memberof google.api.HttpRule + * @instance + * @returns {Object.} JSON object + */ + HttpRule.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for HttpRule + * @function getTypeUrl + * @memberof google.api.HttpRule + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + HttpRule.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.HttpRule"; + }; + + return HttpRule; + })(); + + api.CustomHttpPattern = (function() { + + /** + * Properties of a CustomHttpPattern. + * @memberof google.api + * @interface ICustomHttpPattern + * @property {string|null} [kind] CustomHttpPattern kind + * @property {string|null} [path] CustomHttpPattern path + */ + + /** + * Constructs a new CustomHttpPattern. + * @memberof google.api + * @classdesc Represents a CustomHttpPattern. + * @implements ICustomHttpPattern + * @constructor + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + */ + function CustomHttpPattern(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * CustomHttpPattern kind. + * @member {string} kind + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.kind = ""; + + /** + * CustomHttpPattern path. + * @member {string} path + * @memberof google.api.CustomHttpPattern + * @instance + */ + CustomHttpPattern.prototype.path = ""; + + /** + * Creates a new CustomHttpPattern instance using the specified properties. + * @function create + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern=} [properties] Properties to set + * @returns {google.api.CustomHttpPattern} CustomHttpPattern instance + */ + CustomHttpPattern.create = function create(properties) { + return new CustomHttpPattern(properties); + }; + + /** + * Encodes the specified CustomHttpPattern message. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encode + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.kind != null && Object.hasOwnProperty.call(message, "kind")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.kind); + if (message.path != null && Object.hasOwnProperty.call(message, "path")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.path); + return writer; + }; + + /** + * Encodes the specified CustomHttpPattern message, length delimited. Does not implicitly {@link google.api.CustomHttpPattern.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.ICustomHttpPattern} message CustomHttpPattern message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + CustomHttpPattern.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer. + * @function decode + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.CustomHttpPattern(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.kind = reader.string(); + break; + } + case 2: { + message.path = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a CustomHttpPattern message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.CustomHttpPattern + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + CustomHttpPattern.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a CustomHttpPattern message. + * @function verify + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + CustomHttpPattern.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.kind != null && message.hasOwnProperty("kind")) + if (!$util.isString(message.kind)) + return "kind: string expected"; + if (message.path != null && message.hasOwnProperty("path")) + if (!$util.isString(message.path)) + return "path: string expected"; + return null; + }; + + /** + * Creates a CustomHttpPattern message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {Object.} object Plain object + * @returns {google.api.CustomHttpPattern} CustomHttpPattern + */ + CustomHttpPattern.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.CustomHttpPattern) + return object; + var message = new $root.google.api.CustomHttpPattern(); + if (object.kind != null) + message.kind = String(object.kind); + if (object.path != null) + message.path = String(object.path); + return message; + }; + + /** + * Creates a plain object from a CustomHttpPattern message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.CustomHttpPattern + * @static + * @param {google.api.CustomHttpPattern} message CustomHttpPattern + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + CustomHttpPattern.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.kind = ""; + object.path = ""; + } + if (message.kind != null && message.hasOwnProperty("kind")) + object.kind = message.kind; + if (message.path != null && message.hasOwnProperty("path")) + object.path = message.path; + return object; + }; + + /** + * Converts this CustomHttpPattern to JSON. + * @function toJSON + * @memberof google.api.CustomHttpPattern + * @instance + * @returns {Object.} JSON object + */ + CustomHttpPattern.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for CustomHttpPattern + * @function getTypeUrl + * @memberof google.api.CustomHttpPattern + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + CustomHttpPattern.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.CustomHttpPattern"; + }; + + return CustomHttpPattern; + })(); + + 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) { + 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(); + 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) { + 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(); + 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 + */ + + /** + * 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 = ""; + + /** + * 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); + 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) { + 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(); + 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; + } + 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"; + 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); + 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 = ""; + } + 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; + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceDescriptor(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + if (!(message.pattern && message.pattern.length)) + message.pattern = []; + message.pattern.push(reader.string()); + break; + } + case 3: { + message.nameField = reader.string(); + break; + } + case 4: { + message.history = reader.int32(); + break; + } + case 5: { + message.plural = reader.string(); + break; + } + case 6: { + message.singular = reader.string(); + break; + } + case 10: { + if (!(message.style && message.style.length)) + message.style = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.style.push(reader.int32()); + } else + message.style.push(reader.int32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceDescriptor message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceDescriptor + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceDescriptor.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceDescriptor message. + * @function verify + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceDescriptor.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.pattern != null && message.hasOwnProperty("pattern")) { + if (!Array.isArray(message.pattern)) + return "pattern: array expected"; + for (var i = 0; i < message.pattern.length; ++i) + if (!$util.isString(message.pattern[i])) + return "pattern: string[] expected"; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + if (!$util.isString(message.nameField)) + return "nameField: string expected"; + if (message.history != null && message.hasOwnProperty("history")) + switch (message.history) { + default: + return "history: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.plural != null && message.hasOwnProperty("plural")) + if (!$util.isString(message.plural)) + return "plural: string expected"; + if (message.singular != null && message.hasOwnProperty("singular")) + if (!$util.isString(message.singular)) + return "singular: string expected"; + if (message.style != null && message.hasOwnProperty("style")) { + if (!Array.isArray(message.style)) + return "style: array expected"; + for (var i = 0; i < message.style.length; ++i) + switch (message.style[i]) { + default: + return "style: enum value[] expected"; + case 0: + case 1: + break; + } + } + return null; + }; + + /** + * Creates a ResourceDescriptor message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceDescriptor} ResourceDescriptor + */ + ResourceDescriptor.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceDescriptor) + return object; + var message = new $root.google.api.ResourceDescriptor(); + if (object.type != null) + message.type = String(object.type); + if (object.pattern) { + if (!Array.isArray(object.pattern)) + throw TypeError(".google.api.ResourceDescriptor.pattern: array expected"); + message.pattern = []; + for (var i = 0; i < object.pattern.length; ++i) + message.pattern[i] = String(object.pattern[i]); + } + if (object.nameField != null) + message.nameField = String(object.nameField); + switch (object.history) { + default: + if (typeof object.history === "number") { + message.history = object.history; + break; + } + break; + case "HISTORY_UNSPECIFIED": + case 0: + message.history = 0; + break; + case "ORIGINALLY_SINGLE_PATTERN": + case 1: + message.history = 1; + break; + case "FUTURE_MULTI_PATTERN": + case 2: + message.history = 2; + break; + } + if (object.plural != null) + message.plural = String(object.plural); + if (object.singular != null) + message.singular = String(object.singular); + if (object.style) { + if (!Array.isArray(object.style)) + throw TypeError(".google.api.ResourceDescriptor.style: array expected"); + message.style = []; + for (var i = 0; i < object.style.length; ++i) + switch (object.style[i]) { + default: + if (typeof object.style[i] === "number") { + message.style[i] = object.style[i]; + break; + } + case "STYLE_UNSPECIFIED": + case 0: + message.style[i] = 0; + break; + case "DECLARATIVE_FRIENDLY": + case 1: + message.style[i] = 1; + break; + } + } + return message; + }; + + /** + * Creates a plain object from a ResourceDescriptor message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceDescriptor + * @static + * @param {google.api.ResourceDescriptor} message ResourceDescriptor + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceDescriptor.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.pattern = []; + object.style = []; + } + if (options.defaults) { + object.type = ""; + object.nameField = ""; + object.history = options.enums === String ? "HISTORY_UNSPECIFIED" : 0; + object.plural = ""; + object.singular = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.pattern && message.pattern.length) { + object.pattern = []; + for (var j = 0; j < message.pattern.length; ++j) + object.pattern[j] = message.pattern[j]; + } + if (message.nameField != null && message.hasOwnProperty("nameField")) + object.nameField = message.nameField; + if (message.history != null && message.hasOwnProperty("history")) + object.history = options.enums === String ? $root.google.api.ResourceDescriptor.History[message.history] === undefined ? message.history : $root.google.api.ResourceDescriptor.History[message.history] : message.history; + if (message.plural != null && message.hasOwnProperty("plural")) + object.plural = message.plural; + if (message.singular != null && message.hasOwnProperty("singular")) + object.singular = message.singular; + if (message.style && message.style.length) { + object.style = []; + for (var j = 0; j < message.style.length; ++j) + object.style[j] = options.enums === String ? $root.google.api.ResourceDescriptor.Style[message.style[j]] === undefined ? message.style[j] : $root.google.api.ResourceDescriptor.Style[message.style[j]] : message.style[j]; + } + return object; + }; + + /** + * Converts this ResourceDescriptor to JSON. + * @function toJSON + * @memberof google.api.ResourceDescriptor + * @instance + * @returns {Object.} JSON object + */ + ResourceDescriptor.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceDescriptor + * @function getTypeUrl + * @memberof google.api.ResourceDescriptor + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceDescriptor.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceDescriptor"; + }; + + /** + * History enum. + * @name google.api.ResourceDescriptor.History + * @enum {number} + * @property {number} HISTORY_UNSPECIFIED=0 HISTORY_UNSPECIFIED value + * @property {number} ORIGINALLY_SINGLE_PATTERN=1 ORIGINALLY_SINGLE_PATTERN value + * @property {number} FUTURE_MULTI_PATTERN=2 FUTURE_MULTI_PATTERN value + */ + ResourceDescriptor.History = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "HISTORY_UNSPECIFIED"] = 0; + values[valuesById[1] = "ORIGINALLY_SINGLE_PATTERN"] = 1; + values[valuesById[2] = "FUTURE_MULTI_PATTERN"] = 2; + return values; + })(); + + /** + * Style enum. + * @name google.api.ResourceDescriptor.Style + * @enum {number} + * @property {number} STYLE_UNSPECIFIED=0 STYLE_UNSPECIFIED value + * @property {number} DECLARATIVE_FRIENDLY=1 DECLARATIVE_FRIENDLY value + */ + ResourceDescriptor.Style = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "STYLE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DECLARATIVE_FRIENDLY"] = 1; + return values; + })(); + + return ResourceDescriptor; + })(); + + api.ResourceReference = (function() { + + /** + * Properties of a ResourceReference. + * @memberof google.api + * @interface IResourceReference + * @property {string|null} [type] ResourceReference type + * @property {string|null} [childType] ResourceReference childType + */ + + /** + * Constructs a new ResourceReference. + * @memberof google.api + * @classdesc Represents a ResourceReference. + * @implements IResourceReference + * @constructor + * @param {google.api.IResourceReference=} [properties] Properties to set + */ + function ResourceReference(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ResourceReference type. + * @member {string} type + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.type = ""; + + /** + * ResourceReference childType. + * @member {string} childType + * @memberof google.api.ResourceReference + * @instance + */ + ResourceReference.prototype.childType = ""; + + /** + * Creates a new ResourceReference instance using the specified properties. + * @function create + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference=} [properties] Properties to set + * @returns {google.api.ResourceReference} ResourceReference instance + */ + ResourceReference.create = function create(properties) { + return new ResourceReference(properties); + }; + + /** + * Encodes the specified ResourceReference message. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encode + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.type != null && Object.hasOwnProperty.call(message, "type")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.type); + if (message.childType != null && Object.hasOwnProperty.call(message, "childType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.childType); + return writer; + }; + + /** + * Encodes the specified ResourceReference message, length delimited. Does not implicitly {@link google.api.ResourceReference.verify|verify} messages. + * @function encodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {google.api.IResourceReference} message ResourceReference message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ResourceReference.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer. + * @function decode + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.api.ResourceReference(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.type = reader.string(); + break; + } + case 2: { + message.childType = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ResourceReference message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.api.ResourceReference + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.api.ResourceReference} ResourceReference + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ResourceReference.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ResourceReference message. + * @function verify + * @memberof google.api.ResourceReference + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ResourceReference.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.type != null && message.hasOwnProperty("type")) + if (!$util.isString(message.type)) + return "type: string expected"; + if (message.childType != null && message.hasOwnProperty("childType")) + if (!$util.isString(message.childType)) + return "childType: string expected"; + return null; + }; + + /** + * Creates a ResourceReference message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.api.ResourceReference + * @static + * @param {Object.} object Plain object + * @returns {google.api.ResourceReference} ResourceReference + */ + ResourceReference.fromObject = function fromObject(object) { + if (object instanceof $root.google.api.ResourceReference) + return object; + var message = new $root.google.api.ResourceReference(); + if (object.type != null) + message.type = String(object.type); + if (object.childType != null) + message.childType = String(object.childType); + return message; + }; + + /** + * Creates a plain object from a ResourceReference message. Also converts values to other types if specified. + * @function toObject + * @memberof google.api.ResourceReference + * @static + * @param {google.api.ResourceReference} message ResourceReference + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ResourceReference.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.type = ""; + object.childType = ""; + } + if (message.type != null && message.hasOwnProperty("type")) + object.type = message.type; + if (message.childType != null && message.hasOwnProperty("childType")) + object.childType = message.childType; + return object; + }; + + /** + * Converts this ResourceReference to JSON. + * @function toJSON + * @memberof google.api.ResourceReference + * @instance + * @returns {Object.} JSON object + */ + ResourceReference.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ResourceReference + * @function getTypeUrl + * @memberof google.api.ResourceReference + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ResourceReference.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.api.ResourceReference"; + }; + + return ResourceReference; + })(); + + return api; + })(); + + google.protobuf = (function() { + + /** + * Namespace protobuf. + * @memberof google + * @namespace + */ + var protobuf = {}; + + protobuf.FileDescriptorSet = (function() { + + /** + * Properties of a FileDescriptorSet. + * @memberof google.protobuf + * @interface IFileDescriptorSet + * @property {Array.|null} [file] FileDescriptorSet file + */ + + /** + * Constructs a new FileDescriptorSet. + * @memberof google.protobuf + * @classdesc Represents a FileDescriptorSet. + * @implements IFileDescriptorSet + * @constructor + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + */ + function FileDescriptorSet(properties) { + this.file = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * FileDescriptorSet file. + * @member {Array.} file + * @memberof google.protobuf.FileDescriptorSet + * @instance + */ + FileDescriptorSet.prototype.file = $util.emptyArray; + + /** + * Creates a new FileDescriptorSet instance using the specified properties. + * @function create + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet=} [properties] Properties to set + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet instance + */ + FileDescriptorSet.create = function create(properties) { + return new FileDescriptorSet(properties); + }; + + /** + * Encodes the specified FileDescriptorSet message. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.file != null && message.file.length) + for (var i = 0; i < message.file.length; ++i) + $root.google.protobuf.FileDescriptorProto.encode(message.file[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FileDescriptorSet message, length delimited. Does not implicitly {@link google.protobuf.FileDescriptorSet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.IFileDescriptorSet} message FileDescriptorSet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FileDescriptorSet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorSet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.file && message.file.length)) + message.file = []; + message.file.push($root.google.protobuf.FileDescriptorProto.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FileDescriptorSet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FileDescriptorSet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FileDescriptorSet message. + * @function verify + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FileDescriptorSet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.file != null && message.hasOwnProperty("file")) { + if (!Array.isArray(message.file)) + return "file: array expected"; + for (var i = 0; i < message.file.length; ++i) { + var error = $root.google.protobuf.FileDescriptorProto.verify(message.file[i]); + if (error) + return "file." + error; + } + } + return null; + }; + + /** + * Creates a FileDescriptorSet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.FileDescriptorSet} FileDescriptorSet + */ + FileDescriptorSet.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.FileDescriptorSet) + return object; + var message = new $root.google.protobuf.FileDescriptorSet(); + if (object.file) { + if (!Array.isArray(object.file)) + throw TypeError(".google.protobuf.FileDescriptorSet.file: array expected"); + message.file = []; + for (var i = 0; i < object.file.length; ++i) { + if (typeof object.file[i] !== "object") + throw TypeError(".google.protobuf.FileDescriptorSet.file: object expected"); + message.file[i] = $root.google.protobuf.FileDescriptorProto.fromObject(object.file[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a FileDescriptorSet message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {google.protobuf.FileDescriptorSet} message FileDescriptorSet + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + FileDescriptorSet.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.file = []; + if (message.file && message.file.length) { + object.file = []; + for (var j = 0; j < message.file.length; ++j) + object.file[j] = $root.google.protobuf.FileDescriptorProto.toObject(message.file[j], options); + } + return object; + }; + + /** + * Converts this FileDescriptorSet to JSON. + * @function toJSON + * @memberof google.protobuf.FileDescriptorSet + * @instance + * @returns {Object.} JSON object + */ + FileDescriptorSet.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for FileDescriptorSet + * @function getTypeUrl + * @memberof google.protobuf.FileDescriptorSet + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + FileDescriptorSet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.FileDescriptorSet"; + }; + + return FileDescriptorSet; + })(); + + /** + * 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message["package"] = reader.string(); + break; + } + case 3: { + if (!(message.dependency && message.dependency.length)) + message.dependency = []; + message.dependency.push(reader.string()); + break; + } + case 10: { + if (!(message.publicDependency && message.publicDependency.length)) + message.publicDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.publicDependency.push(reader.int32()); + } else + message.publicDependency.push(reader.int32()); + break; + } + case 11: { + if (!(message.weakDependency && message.weakDependency.length)) + message.weakDependency = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.weakDependency.push(reader.int32()); + } else + message.weakDependency.push(reader.int32()); + break; + } + case 4: { + if (!(message.messageType && message.messageType.length)) + message.messageType = []; + message.messageType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.service && message.service.length)) + message.service = []; + message.service.push($root.google.protobuf.ServiceDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 8: { + message.options = $root.google.protobuf.FileOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + message.sourceCodeInfo = $root.google.protobuf.SourceCodeInfo.decode(reader, reader.uint32()); + break; + } + case 12: { + message.syntax = reader.string(); + break; + } + case 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.field && message.field.length)) + message.field = []; + message.field.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 6: { + if (!(message.extension && message.extension.length)) + message.extension = []; + message.extension.push($root.google.protobuf.FieldDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + if (!(message.nestedType && message.nestedType.length)) + message.nestedType = []; + message.nestedType.push($root.google.protobuf.DescriptorProto.decode(reader, reader.uint32())); + break; + } + case 4: { + if (!(message.enumType && message.enumType.length)) + message.enumType = []; + message.enumType.push($root.google.protobuf.EnumDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.extensionRange && message.extensionRange.length)) + message.extensionRange = []; + message.extensionRange.push($root.google.protobuf.DescriptorProto.ExtensionRange.decode(reader, reader.uint32())); + break; + } + case 8: { + if (!(message.oneofDecl && message.oneofDecl.length)) + message.oneofDecl = []; + message.oneofDecl.push($root.google.protobuf.OneofDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 7: { + message.options = $root.google.protobuf.MessageOptions.decode(reader, reader.uint32()); + break; + } + case 9: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.DescriptorProto.ReservedRange.decode(reader, reader.uint32())); + break; + } + case 10: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto} DescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DescriptorProto message. + * @function verify + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.field != null && message.hasOwnProperty("field")) { + if (!Array.isArray(message.field)) + return "field: array expected"; + for (var i = 0; i < message.field.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.field[i]); + if (error) + return "field." + error; + } + } + if (message.extension != null && message.hasOwnProperty("extension")) { + if (!Array.isArray(message.extension)) + return "extension: array expected"; + for (var i = 0; i < message.extension.length; ++i) { + var error = $root.google.protobuf.FieldDescriptorProto.verify(message.extension[i]); + if (error) + return "extension." + error; + } + } + if (message.nestedType != null && message.hasOwnProperty("nestedType")) { + if (!Array.isArray(message.nestedType)) + return "nestedType: array expected"; + for (var i = 0; i < message.nestedType.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.verify(message.nestedType[i]); + if (error) + return "nestedType." + error; + } + } + if (message.enumType != null && message.hasOwnProperty("enumType")) { + if (!Array.isArray(message.enumType)) + return "enumType: array expected"; + for (var i = 0; i < message.enumType.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.verify(message.enumType[i]); + if (error) + return "enumType." + error; + } + } + if (message.extensionRange != null && message.hasOwnProperty("extensionRange")) { + if (!Array.isArray(message.extensionRange)) + return "extensionRange: array expected"; + for (var i = 0; i < message.extensionRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ExtensionRange.verify(message.extensionRange[i]); + if (error) + return "extensionRange." + error; + } + } + if (message.oneofDecl != null && message.hasOwnProperty("oneofDecl")) { + if (!Array.isArray(message.oneofDecl)) + return "oneofDecl: array expected"; + for (var i = 0; i < message.oneofDecl.length; ++i) { + var error = $root.google.protobuf.OneofDescriptorProto.verify(message.oneofDecl[i]); + if (error) + return "oneofDecl." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MessageOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.DescriptorProto.ReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates a DescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto} DescriptorProto + */ + DescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto) + return object; + var message = new $root.google.protobuf.DescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.field) { + if (!Array.isArray(object.field)) + throw TypeError(".google.protobuf.DescriptorProto.field: array expected"); + message.field = []; + for (var i = 0; i < object.field.length; ++i) { + if (typeof object.field[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.field: object expected"); + message.field[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.field[i]); + } + } + if (object.extension) { + if (!Array.isArray(object.extension)) + throw TypeError(".google.protobuf.DescriptorProto.extension: array expected"); + message.extension = []; + for (var i = 0; i < object.extension.length; ++i) { + if (typeof object.extension[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extension: object expected"); + message.extension[i] = $root.google.protobuf.FieldDescriptorProto.fromObject(object.extension[i]); + } + } + if (object.nestedType) { + if (!Array.isArray(object.nestedType)) + throw TypeError(".google.protobuf.DescriptorProto.nestedType: array expected"); + message.nestedType = []; + for (var i = 0; i < object.nestedType.length; ++i) { + if (typeof object.nestedType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.nestedType: object expected"); + message.nestedType[i] = $root.google.protobuf.DescriptorProto.fromObject(object.nestedType[i]); + } + } + if (object.enumType) { + if (!Array.isArray(object.enumType)) + throw TypeError(".google.protobuf.DescriptorProto.enumType: array expected"); + message.enumType = []; + for (var i = 0; i < object.enumType.length; ++i) { + if (typeof object.enumType[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.enumType: object expected"); + message.enumType[i] = $root.google.protobuf.EnumDescriptorProto.fromObject(object.enumType[i]); + } + } + if (object.extensionRange) { + if (!Array.isArray(object.extensionRange)) + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: array expected"); + message.extensionRange = []; + for (var i = 0; i < object.extensionRange.length; ++i) { + if (typeof object.extensionRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.extensionRange: object expected"); + message.extensionRange[i] = $root.google.protobuf.DescriptorProto.ExtensionRange.fromObject(object.extensionRange[i]); + } + } + if (object.oneofDecl) { + if (!Array.isArray(object.oneofDecl)) + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: array expected"); + message.oneofDecl = []; + for (var i = 0; i < object.oneofDecl.length; ++i) { + if (typeof object.oneofDecl[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.oneofDecl: object expected"); + message.oneofDecl[i] = $root.google.protobuf.OneofDescriptorProto.fromObject(object.oneofDecl[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MessageOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.DescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.DescriptorProto.ReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.DescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from a DescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto + * @static + * @param {google.protobuf.DescriptorProto} message DescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.field = []; + object.nestedType = []; + object.enumType = []; + object.extensionRange = []; + object.extension = []; + object.oneofDecl = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.field && message.field.length) { + object.field = []; + for (var j = 0; j < message.field.length; ++j) + object.field[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.field[j], options); + } + if (message.nestedType && message.nestedType.length) { + object.nestedType = []; + for (var j = 0; j < message.nestedType.length; ++j) + object.nestedType[j] = $root.google.protobuf.DescriptorProto.toObject(message.nestedType[j], options); + } + if (message.enumType && message.enumType.length) { + object.enumType = []; + for (var j = 0; j < message.enumType.length; ++j) + object.enumType[j] = $root.google.protobuf.EnumDescriptorProto.toObject(message.enumType[j], options); + } + if (message.extensionRange && message.extensionRange.length) { + object.extensionRange = []; + for (var j = 0; j < message.extensionRange.length; ++j) + object.extensionRange[j] = $root.google.protobuf.DescriptorProto.ExtensionRange.toObject(message.extensionRange[j], options); + } + if (message.extension && message.extension.length) { + object.extension = []; + for (var j = 0; j < message.extension.length; ++j) + object.extension[j] = $root.google.protobuf.FieldDescriptorProto.toObject(message.extension[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MessageOptions.toObject(message.options, options); + if (message.oneofDecl && message.oneofDecl.length) { + object.oneofDecl = []; + for (var j = 0; j < message.oneofDecl.length; ++j) + object.oneofDecl[j] = $root.google.protobuf.OneofDescriptorProto.toObject(message.oneofDecl[j], options); + } + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.DescriptorProto.ReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this DescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto + * @instance + * @returns {Object.} JSON object + */ + DescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto"; + }; + + DescriptorProto.ExtensionRange = (function() { + + /** + * Properties of an ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @interface IExtensionRange + * @property {number|null} [start] ExtensionRange start + * @property {number|null} [end] ExtensionRange end + * @property {google.protobuf.IExtensionRangeOptions|null} [options] ExtensionRange options + */ + + /** + * Constructs a new ExtensionRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents an ExtensionRange. + * @implements IExtensionRange + * @constructor + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + */ + function ExtensionRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ExtensionRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.start = 0; + + /** + * ExtensionRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.end = 0; + + /** + * ExtensionRange options. + * @member {google.protobuf.IExtensionRangeOptions|null|undefined} options + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + */ + ExtensionRange.prototype.options = null; + + /** + * Creates a new ExtensionRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange instance + */ + ExtensionRange.create = function create(properties) { + return new ExtensionRange(properties); + }; + + /** + * Encodes the specified ExtensionRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ExtensionRangeOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ExtensionRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ExtensionRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.IExtensionRange} message ExtensionRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ExtensionRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.ExtensionRangeOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an ExtensionRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ExtensionRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an ExtensionRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ExtensionRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ExtensionRangeOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an ExtensionRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ExtensionRange} ExtensionRange + */ + ExtensionRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ExtensionRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ExtensionRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.DescriptorProto.ExtensionRange.options: object expected"); + message.options = $root.google.protobuf.ExtensionRangeOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an ExtensionRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {google.protobuf.DescriptorProto.ExtensionRange} message ExtensionRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ExtensionRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + object.options = null; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ExtensionRangeOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ExtensionRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @instance + * @returns {Object.} JSON object + */ + ExtensionRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ExtensionRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ExtensionRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ExtensionRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ExtensionRange"; + }; + + return ExtensionRange; + })(); + + DescriptorProto.ReservedRange = (function() { + + /** + * Properties of a ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @interface IReservedRange + * @property {number|null} [start] ReservedRange start + * @property {number|null} [end] ReservedRange end + */ + + /** + * Constructs a new ReservedRange. + * @memberof google.protobuf.DescriptorProto + * @classdesc Represents a ReservedRange. + * @implements IReservedRange + * @constructor + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + */ + function ReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ReservedRange start. + * @member {number} start + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.start = 0; + + /** + * ReservedRange end. + * @member {number} end + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + */ + ReservedRange.prototype.end = 0; + + /** + * Creates a new ReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange=} [properties] Properties to set + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange instance + */ + ReservedRange.create = function create(properties) { + return new ReservedRange(properties); + }; + + /** + * Encodes the specified ReservedRange message. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified ReservedRange message, length delimited. Does not implicitly {@link google.protobuf.DescriptorProto.ReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.IReservedRange} message ReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ReservedRange message. + * @function verify + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates a ReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.DescriptorProto.ReservedRange} ReservedRange + */ + ReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.DescriptorProto.ReservedRange) + return object; + var message = new $root.google.protobuf.DescriptorProto.ReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from a ReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {google.protobuf.DescriptorProto.ReservedRange} message ReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this ReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @instance + * @returns {Object.} JSON object + */ + ReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ReservedRange + * @function getTypeUrl + * @memberof google.protobuf.DescriptorProto.ReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.DescriptorProto.ReservedRange"; + }; + + return ReservedRange; + })(); + + return DescriptorProto; + })(); + + protobuf.ExtensionRangeOptions = (function() { + + /** + * Properties of an ExtensionRangeOptions. + * @memberof google.protobuf + * @interface IExtensionRangeOptions + * @property {Array.|null} [uninterpretedOption] ExtensionRangeOptions uninterpretedOption + * @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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ExtensionRangeOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 3: { + message.number = reader.int32(); + break; + } + case 4: { + message.label = reader.int32(); + break; + } + case 5: { + message.type = reader.int32(); + break; + } + case 6: { + message.typeName = reader.string(); + break; + } + case 2: { + message.extendee = reader.string(); + break; + } + case 7: { + message.defaultValue = reader.string(); + break; + } + case 9: { + message.oneofIndex = reader.int32(); + break; + } + case 10: { + message.jsonName = reader.string(); + break; + } + case 8: { + message.options = $root.google.protobuf.FieldOptions.decode(reader, reader.uint32()); + break; + } + case 17: { + message.proto3Optional = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a FieldDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.FieldDescriptorProto} FieldDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a FieldDescriptorProto message. + * @function verify + * @memberof google.protobuf.FieldDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + FieldDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.label != null && message.hasOwnProperty("label")) + switch (message.label) { + default: + return "label: enum value expected"; + case 1: + case 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.options = $root.google.protobuf.OneofOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an OneofDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + OneofDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an OneofDescriptorProto message. + * @function verify + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + OneofDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.OneofOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an OneofDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.OneofDescriptorProto} OneofDescriptorProto + */ + OneofDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.OneofDescriptorProto) + return object; + var message = new $root.google.protobuf.OneofDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.OneofDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.OneofOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an OneofDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {google.protobuf.OneofDescriptorProto} message OneofDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + OneofDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.OneofOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this OneofDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.OneofDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + OneofDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for OneofDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.OneofDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + OneofDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.OneofDescriptorProto"; + }; + + return OneofDescriptorProto; + })(); + + protobuf.EnumDescriptorProto = (function() { + + /** + * Properties of an EnumDescriptorProto. + * @memberof google.protobuf + * @interface IEnumDescriptorProto + * @property {string|null} [name] EnumDescriptorProto name + * @property {Array.|null} [value] EnumDescriptorProto value + * @property {google.protobuf.IEnumOptions|null} [options] EnumDescriptorProto options + * @property {Array.|null} [reservedRange] EnumDescriptorProto reservedRange + * @property {Array.|null} [reservedName] EnumDescriptorProto reservedName + */ + + /** + * Constructs a new EnumDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumDescriptorProto. + * @implements IEnumDescriptorProto + * @constructor + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + */ + function EnumDescriptorProto(properties) { + this.value = []; + this.reservedRange = []; + this.reservedName = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.name = ""; + + /** + * EnumDescriptorProto value. + * @member {Array.} value + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.value = $util.emptyArray; + + /** + * EnumDescriptorProto options. + * @member {google.protobuf.IEnumOptions|null|undefined} options + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.options = null; + + /** + * EnumDescriptorProto reservedRange. + * @member {Array.} reservedRange + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedRange = $util.emptyArray; + + /** + * EnumDescriptorProto reservedName. + * @member {Array.} reservedName + * @memberof google.protobuf.EnumDescriptorProto + * @instance + */ + EnumDescriptorProto.prototype.reservedName = $util.emptyArray; + + /** + * Creates a new EnumDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto instance + */ + EnumDescriptorProto.create = function create(properties) { + return new EnumDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumDescriptorProto message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.value != null && message.value.length) + for (var i = 0; i < message.value.length; ++i) + $root.google.protobuf.EnumValueDescriptorProto.encode(message.value[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.reservedRange != null && message.reservedRange.length) + for (var i = 0; i < message.reservedRange.length; ++i) + $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.encode(message.reservedRange[i], writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.reservedName != null && message.reservedName.length) + for (var i = 0; i < message.reservedName.length; ++i) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.reservedName[i]); + return writer; + }; + + /** + * Encodes the specified EnumDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.IEnumDescriptorProto} message EnumDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.value && message.value.length)) + message.value = []; + message.value.push($root.google.protobuf.EnumValueDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumOptions.decode(reader, reader.uint32()); + break; + } + case 4: { + if (!(message.reservedRange && message.reservedRange.length)) + message.reservedRange = []; + message.reservedRange.push($root.google.protobuf.EnumDescriptorProto.EnumReservedRange.decode(reader, reader.uint32())); + break; + } + case 5: { + if (!(message.reservedName && message.reservedName.length)) + message.reservedName = []; + message.reservedName.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.value != null && message.hasOwnProperty("value")) { + if (!Array.isArray(message.value)) + return "value: array expected"; + for (var i = 0; i < message.value.length; ++i) { + var error = $root.google.protobuf.EnumValueDescriptorProto.verify(message.value[i]); + if (error) + return "value." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.reservedRange != null && message.hasOwnProperty("reservedRange")) { + if (!Array.isArray(message.reservedRange)) + return "reservedRange: array expected"; + for (var i = 0; i < message.reservedRange.length; ++i) { + var error = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.verify(message.reservedRange[i]); + if (error) + return "reservedRange." + error; + } + } + if (message.reservedName != null && message.hasOwnProperty("reservedName")) { + if (!Array.isArray(message.reservedName)) + return "reservedName: array expected"; + for (var i = 0; i < message.reservedName.length; ++i) + if (!$util.isString(message.reservedName[i])) + return "reservedName: string[] expected"; + } + return null; + }; + + /** + * Creates an EnumDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto} EnumDescriptorProto + */ + EnumDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.value) { + if (!Array.isArray(object.value)) + throw TypeError(".google.protobuf.EnumDescriptorProto.value: array expected"); + message.value = []; + for (var i = 0; i < object.value.length; ++i) { + if (typeof object.value[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.value: object expected"); + message.value[i] = $root.google.protobuf.EnumValueDescriptorProto.fromObject(object.value[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumOptions.fromObject(object.options); + } + if (object.reservedRange) { + if (!Array.isArray(object.reservedRange)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: array expected"); + message.reservedRange = []; + for (var i = 0; i < object.reservedRange.length; ++i) { + if (typeof object.reservedRange[i] !== "object") + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedRange: object expected"); + message.reservedRange[i] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.fromObject(object.reservedRange[i]); + } + } + if (object.reservedName) { + if (!Array.isArray(object.reservedName)) + throw TypeError(".google.protobuf.EnumDescriptorProto.reservedName: array expected"); + message.reservedName = []; + for (var i = 0; i < object.reservedName.length; ++i) + message.reservedName[i] = String(object.reservedName[i]); + } + return message; + }; + + /** + * Creates a plain object from an EnumDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {google.protobuf.EnumDescriptorProto} message EnumDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.value = []; + object.reservedRange = []; + object.reservedName = []; + } + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.value && message.value.length) { + object.value = []; + for (var j = 0; j < message.value.length; ++j) + object.value[j] = $root.google.protobuf.EnumValueDescriptorProto.toObject(message.value[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumOptions.toObject(message.options, options); + if (message.reservedRange && message.reservedRange.length) { + object.reservedRange = []; + for (var j = 0; j < message.reservedRange.length; ++j) + object.reservedRange[j] = $root.google.protobuf.EnumDescriptorProto.EnumReservedRange.toObject(message.reservedRange[j], options); + } + if (message.reservedName && message.reservedName.length) { + object.reservedName = []; + for (var j = 0; j < message.reservedName.length; ++j) + object.reservedName[j] = message.reservedName[j]; + } + return object; + }; + + /** + * Converts this EnumDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto"; + }; + + EnumDescriptorProto.EnumReservedRange = (function() { + + /** + * Properties of an EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @interface IEnumReservedRange + * @property {number|null} [start] EnumReservedRange start + * @property {number|null} [end] EnumReservedRange end + */ + + /** + * Constructs a new EnumReservedRange. + * @memberof google.protobuf.EnumDescriptorProto + * @classdesc Represents an EnumReservedRange. + * @implements IEnumReservedRange + * @constructor + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + */ + function EnumReservedRange(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumReservedRange start. + * @member {number} start + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.start = 0; + + /** + * EnumReservedRange end. + * @member {number} end + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + */ + EnumReservedRange.prototype.end = 0; + + /** + * Creates a new EnumReservedRange instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange=} [properties] Properties to set + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange instance + */ + EnumReservedRange.create = function create(properties) { + return new EnumReservedRange(properties); + }; + + /** + * Encodes the specified EnumReservedRange message. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.start != null && Object.hasOwnProperty.call(message, "start")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.start); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.end); + return writer; + }; + + /** + * Encodes the specified EnumReservedRange message, length delimited. Does not implicitly {@link google.protobuf.EnumDescriptorProto.EnumReservedRange.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.IEnumReservedRange} message EnumReservedRange message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumReservedRange.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.start = reader.int32(); + break; + } + case 2: { + message.end = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumReservedRange message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumReservedRange.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumReservedRange message. + * @function verify + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumReservedRange.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.start != null && message.hasOwnProperty("start")) + if (!$util.isInteger(message.start)) + return "start: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + return null; + }; + + /** + * Creates an EnumReservedRange message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumDescriptorProto.EnumReservedRange} EnumReservedRange + */ + EnumReservedRange.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumDescriptorProto.EnumReservedRange) + return object; + var message = new $root.google.protobuf.EnumDescriptorProto.EnumReservedRange(); + if (object.start != null) + message.start = object.start | 0; + if (object.end != null) + message.end = object.end | 0; + return message; + }; + + /** + * Creates a plain object from an EnumReservedRange message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {google.protobuf.EnumDescriptorProto.EnumReservedRange} message EnumReservedRange + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumReservedRange.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.start = 0; + object.end = 0; + } + if (message.start != null && message.hasOwnProperty("start")) + object.start = message.start; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + return object; + }; + + /** + * Converts this EnumReservedRange to JSON. + * @function toJSON + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @instance + * @returns {Object.} JSON object + */ + EnumReservedRange.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumReservedRange + * @function getTypeUrl + * @memberof google.protobuf.EnumDescriptorProto.EnumReservedRange + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumReservedRange.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumDescriptorProto.EnumReservedRange"; + }; + + return EnumReservedRange; + })(); + + return EnumDescriptorProto; + })(); + + protobuf.EnumValueDescriptorProto = (function() { + + /** + * Properties of an EnumValueDescriptorProto. + * @memberof google.protobuf + * @interface IEnumValueDescriptorProto + * @property {string|null} [name] EnumValueDescriptorProto name + * @property {number|null} [number] EnumValueDescriptorProto number + * @property {google.protobuf.IEnumValueOptions|null} [options] EnumValueDescriptorProto options + */ + + /** + * Constructs a new EnumValueDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents an EnumValueDescriptorProto. + * @implements IEnumValueDescriptorProto + * @constructor + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + */ + function EnumValueDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * EnumValueDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.name = ""; + + /** + * EnumValueDescriptorProto number. + * @member {number} number + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.number = 0; + + /** + * EnumValueDescriptorProto options. + * @member {google.protobuf.IEnumValueOptions|null|undefined} options + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + */ + EnumValueDescriptorProto.prototype.options = null; + + /** + * Creates a new EnumValueDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto instance + */ + EnumValueDescriptorProto.create = function create(properties) { + return new EnumValueDescriptorProto(properties); + }; + + /** + * Encodes the specified EnumValueDescriptorProto message. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.number != null && Object.hasOwnProperty.call(message, "number")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.number); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.EnumValueOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified EnumValueDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.EnumValueDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.IEnumValueDescriptorProto} message EnumValueDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + EnumValueDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.number = reader.int32(); + break; + } + case 3: { + message.options = $root.google.protobuf.EnumValueOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an EnumValueDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + EnumValueDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an EnumValueDescriptorProto message. + * @function verify + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + EnumValueDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.number != null && message.hasOwnProperty("number")) + if (!$util.isInteger(message.number)) + return "number: integer expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.EnumValueOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates an EnumValueDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.EnumValueDescriptorProto} EnumValueDescriptorProto + */ + EnumValueDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.EnumValueDescriptorProto) + return object; + var message = new $root.google.protobuf.EnumValueDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.number != null) + message.number = object.number | 0; + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.EnumValueDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.EnumValueOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from an EnumValueDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {google.protobuf.EnumValueDescriptorProto} message EnumValueDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + EnumValueDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.number = 0; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.number != null && message.hasOwnProperty("number")) + object.number = message.number; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.EnumValueOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this EnumValueDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.EnumValueDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + EnumValueDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for EnumValueDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.EnumValueDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + EnumValueDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.EnumValueDescriptorProto"; + }; + + return EnumValueDescriptorProto; + })(); + + protobuf.ServiceDescriptorProto = (function() { + + /** + * Properties of a ServiceDescriptorProto. + * @memberof google.protobuf + * @interface IServiceDescriptorProto + * @property {string|null} [name] ServiceDescriptorProto name + * @property {Array.|null} [method] ServiceDescriptorProto method + * @property {google.protobuf.IServiceOptions|null} [options] ServiceDescriptorProto options + */ + + /** + * Constructs a new ServiceDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a ServiceDescriptorProto. + * @implements IServiceDescriptorProto + * @constructor + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + */ + function ServiceDescriptorProto(properties) { + this.method = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ServiceDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.name = ""; + + /** + * ServiceDescriptorProto method. + * @member {Array.} method + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.method = $util.emptyArray; + + /** + * ServiceDescriptorProto options. + * @member {google.protobuf.IServiceOptions|null|undefined} options + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + */ + ServiceDescriptorProto.prototype.options = null; + + /** + * Creates a new ServiceDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto instance + */ + ServiceDescriptorProto.create = function create(properties) { + return new ServiceDescriptorProto(properties); + }; + + /** + * Encodes the specified ServiceDescriptorProto message. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.method != null && message.method.length) + for (var i = 0; i < message.method.length; ++i) + $root.google.protobuf.MethodDescriptorProto.encode(message.method[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.ServiceOptions.encode(message.options, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified ServiceDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.ServiceDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.IServiceDescriptorProto} message ServiceDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + if (!(message.method && message.method.length)) + message.method = []; + message.method.push($root.google.protobuf.MethodDescriptorProto.decode(reader, reader.uint32())); + break; + } + case 3: { + message.options = $root.google.protobuf.ServiceOptions.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ServiceDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ServiceDescriptorProto message. + * @function verify + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ServiceDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.method != null && message.hasOwnProperty("method")) { + if (!Array.isArray(message.method)) + return "method: array expected"; + for (var i = 0; i < message.method.length; ++i) { + var error = $root.google.protobuf.MethodDescriptorProto.verify(message.method[i]); + if (error) + return "method." + error; + } + } + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.ServiceOptions.verify(message.options); + if (error) + return "options." + error; + } + return null; + }; + + /** + * Creates a ServiceDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.ServiceDescriptorProto} ServiceDescriptorProto + */ + ServiceDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.ServiceDescriptorProto) + return object; + var message = new $root.google.protobuf.ServiceDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.method) { + if (!Array.isArray(object.method)) + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: array expected"); + message.method = []; + for (var i = 0; i < object.method.length; ++i) { + if (typeof object.method[i] !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.method: object expected"); + message.method[i] = $root.google.protobuf.MethodDescriptorProto.fromObject(object.method[i]); + } + } + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.ServiceDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.ServiceOptions.fromObject(object.options); + } + return message; + }; + + /** + * Creates a plain object from a ServiceDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {google.protobuf.ServiceDescriptorProto} message ServiceDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ServiceDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.method = []; + if (options.defaults) { + object.name = ""; + object.options = null; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.method && message.method.length) { + object.method = []; + for (var j = 0; j < message.method.length; ++j) + object.method[j] = $root.google.protobuf.MethodDescriptorProto.toObject(message.method[j], options); + } + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.ServiceOptions.toObject(message.options, options); + return object; + }; + + /** + * Converts this ServiceDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + ServiceDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.ServiceDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceDescriptorProto"; + }; + + return ServiceDescriptorProto; + })(); + + protobuf.MethodDescriptorProto = (function() { + + /** + * Properties of a MethodDescriptorProto. + * @memberof google.protobuf + * @interface IMethodDescriptorProto + * @property {string|null} [name] MethodDescriptorProto name + * @property {string|null} [inputType] MethodDescriptorProto inputType + * @property {string|null} [outputType] MethodDescriptorProto outputType + * @property {google.protobuf.IMethodOptions|null} [options] MethodDescriptorProto options + * @property {boolean|null} [clientStreaming] MethodDescriptorProto clientStreaming + * @property {boolean|null} [serverStreaming] MethodDescriptorProto serverStreaming + */ + + /** + * Constructs a new MethodDescriptorProto. + * @memberof google.protobuf + * @classdesc Represents a MethodDescriptorProto. + * @implements IMethodDescriptorProto + * @constructor + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + */ + function MethodDescriptorProto(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodDescriptorProto name. + * @member {string} name + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.name = ""; + + /** + * MethodDescriptorProto inputType. + * @member {string} inputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.inputType = ""; + + /** + * MethodDescriptorProto outputType. + * @member {string} outputType + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.outputType = ""; + + /** + * MethodDescriptorProto options. + * @member {google.protobuf.IMethodOptions|null|undefined} options + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.options = null; + + /** + * MethodDescriptorProto clientStreaming. + * @member {boolean} clientStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.clientStreaming = false; + + /** + * MethodDescriptorProto serverStreaming. + * @member {boolean} serverStreaming + * @memberof google.protobuf.MethodDescriptorProto + * @instance + */ + MethodDescriptorProto.prototype.serverStreaming = false; + + /** + * Creates a new MethodDescriptorProto instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto=} [properties] Properties to set + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto instance + */ + MethodDescriptorProto.create = function create(properties) { + return new MethodDescriptorProto(properties); + }; + + /** + * Encodes the specified MethodDescriptorProto message. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && Object.hasOwnProperty.call(message, "name")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.name); + if (message.inputType != null && Object.hasOwnProperty.call(message, "inputType")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.inputType); + if (message.outputType != null && Object.hasOwnProperty.call(message, "outputType")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.outputType); + if (message.options != null && Object.hasOwnProperty.call(message, "options")) + $root.google.protobuf.MethodOptions.encode(message.options, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.clientStreaming != null && Object.hasOwnProperty.call(message, "clientStreaming")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.clientStreaming); + if (message.serverStreaming != null && Object.hasOwnProperty.call(message, "serverStreaming")) + writer.uint32(/* id 6, wireType 0 =*/48).bool(message.serverStreaming); + return writer; + }; + + /** + * Encodes the specified MethodDescriptorProto message, length delimited. Does not implicitly {@link google.protobuf.MethodDescriptorProto.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.IMethodDescriptorProto} message MethodDescriptorProto message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodDescriptorProto.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodDescriptorProto(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.name = reader.string(); + break; + } + case 2: { + message.inputType = reader.string(); + break; + } + case 3: { + message.outputType = reader.string(); + break; + } + case 4: { + message.options = $root.google.protobuf.MethodOptions.decode(reader, reader.uint32()); + break; + } + case 5: { + message.clientStreaming = reader.bool(); + break; + } + case 6: { + message.serverStreaming = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodDescriptorProto message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodDescriptorProto.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodDescriptorProto message. + * @function verify + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodDescriptorProto.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) + if (!$util.isString(message.name)) + return "name: string expected"; + if (message.inputType != null && message.hasOwnProperty("inputType")) + if (!$util.isString(message.inputType)) + return "inputType: string expected"; + if (message.outputType != null && message.hasOwnProperty("outputType")) + if (!$util.isString(message.outputType)) + return "outputType: string expected"; + if (message.options != null && message.hasOwnProperty("options")) { + var error = $root.google.protobuf.MethodOptions.verify(message.options); + if (error) + return "options." + error; + } + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + if (typeof message.clientStreaming !== "boolean") + return "clientStreaming: boolean expected"; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + if (typeof message.serverStreaming !== "boolean") + return "serverStreaming: boolean expected"; + return null; + }; + + /** + * Creates a MethodDescriptorProto message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodDescriptorProto} MethodDescriptorProto + */ + MethodDescriptorProto.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodDescriptorProto) + return object; + var message = new $root.google.protobuf.MethodDescriptorProto(); + if (object.name != null) + message.name = String(object.name); + if (object.inputType != null) + message.inputType = String(object.inputType); + if (object.outputType != null) + message.outputType = String(object.outputType); + if (object.options != null) { + if (typeof object.options !== "object") + throw TypeError(".google.protobuf.MethodDescriptorProto.options: object expected"); + message.options = $root.google.protobuf.MethodOptions.fromObject(object.options); + } + if (object.clientStreaming != null) + message.clientStreaming = Boolean(object.clientStreaming); + if (object.serverStreaming != null) + message.serverStreaming = Boolean(object.serverStreaming); + return message; + }; + + /** + * Creates a plain object from a MethodDescriptorProto message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {google.protobuf.MethodDescriptorProto} message MethodDescriptorProto + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodDescriptorProto.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.name = ""; + object.inputType = ""; + object.outputType = ""; + object.options = null; + object.clientStreaming = false; + object.serverStreaming = false; + } + if (message.name != null && message.hasOwnProperty("name")) + object.name = message.name; + if (message.inputType != null && message.hasOwnProperty("inputType")) + object.inputType = message.inputType; + if (message.outputType != null && message.hasOwnProperty("outputType")) + object.outputType = message.outputType; + if (message.options != null && message.hasOwnProperty("options")) + object.options = $root.google.protobuf.MethodOptions.toObject(message.options, options); + if (message.clientStreaming != null && message.hasOwnProperty("clientStreaming")) + object.clientStreaming = message.clientStreaming; + if (message.serverStreaming != null && message.hasOwnProperty("serverStreaming")) + object.serverStreaming = message.serverStreaming; + return object; + }; + + /** + * Converts this MethodDescriptorProto to JSON. + * @function toJSON + * @memberof google.protobuf.MethodDescriptorProto + * @instance + * @returns {Object.} JSON object + */ + MethodDescriptorProto.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodDescriptorProto + * @function getTypeUrl + * @memberof google.protobuf.MethodDescriptorProto + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodDescriptorProto.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodDescriptorProto"; + }; + + return MethodDescriptorProto; + })(); + + protobuf.FileOptions = (function() { + + /** + * Properties of a FileOptions. + * @memberof google.protobuf + * @interface IFileOptions + * @property {string|null} [javaPackage] FileOptions javaPackage + * @property {string|null} [javaOuterClassname] FileOptions javaOuterClassname + * @property {boolean|null} [javaMultipleFiles] FileOptions javaMultipleFiles + * @property {boolean|null} [javaGenerateEqualsAndHash] FileOptions javaGenerateEqualsAndHash + * @property {boolean|null} [javaStringCheckUtf8] FileOptions javaStringCheckUtf8 + * @property {google.protobuf.FileOptions.OptimizeMode|null} [optimizeFor] FileOptions optimizeFor + * @property {string|null} [goPackage] FileOptions goPackage + * @property {boolean|null} [ccGenericServices] FileOptions ccGenericServices + * @property {boolean|null} [javaGenericServices] FileOptions javaGenericServices + * @property {boolean|null} [pyGenericServices] FileOptions pyGenericServices + * @property {boolean|null} [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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FileOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.javaPackage = reader.string(); + break; + } + case 8: { + message.javaOuterClassname = reader.string(); + break; + } + case 10: { + message.javaMultipleFiles = reader.bool(); + break; + } + case 20: { + message.javaGenerateEqualsAndHash = reader.bool(); + break; + } + case 27: { + message.javaStringCheckUtf8 = reader.bool(); + break; + } + case 9: { + message.optimizeFor = reader.int32(); + break; + } + case 11: { + message.goPackage = reader.string(); + break; + } + case 16: { + message.ccGenericServices = reader.bool(); + break; + } + case 17: { + message.javaGenericServices = reader.bool(); + break; + } + case 18: { + message.pyGenericServices = reader.bool(); + break; + } + case 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MessageOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.messageSetWireFormat = reader.bool(); + break; + } + case 2: { + message.noStandardDescriptorAccessor = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 7: { + message.mapEntry = reader.bool(); + break; + } + case 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) { + writer.uint32(/* id 1052, wireType 2 =*/8418).fork(); + for (var i = 0; i < message[".google.api.fieldBehavior"].length; ++i) + writer.int32(message[".google.api.fieldBehavior"][i]); + writer.ldelim(); + } + if (message[".google.api.resourceReference"] != null && Object.hasOwnProperty.call(message, ".google.api.resourceReference")) + $root.google.api.ResourceReference.encode(message[".google.api.resourceReference"], writer.uint32(/* id 1055, wireType 2 =*/8442).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified FieldOptions message, length delimited. Does not implicitly {@link google.protobuf.FieldOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.FieldOptions + * @static + * @param {google.protobuf.IFieldOptions} message FieldOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + FieldOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a FieldOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.FieldOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.FieldOptions} FieldOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + FieldOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.FieldOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.ctype = reader.int32(); + break; + } + case 2: { + message.packed = reader.bool(); + break; + } + case 6: { + message.jstype = reader.int32(); + break; + } + case 5: { + message.lazy = reader.bool(); + break; + } + case 15: { + message.unverifiedLazy = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 10: { + message.weak = reader.bool(); + break; + } + case 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.OneofOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.allowAlias = reader.bool(); + break; + } + case 3: { + message.deprecated = reader.bool(); + break; + } + case 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.EnumValueOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.deprecated = reader.bool(); + break; + } + case 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 + */ + + /** + * 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"] = ""; + + /** + * 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"]); + return writer; + }; + + /** + * Encodes the specified ServiceOptions message, length delimited. Does not implicitly {@link google.protobuf.ServiceOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.ServiceOptions + * @static + * @param {google.protobuf.IServiceOptions} message ServiceOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ServiceOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ServiceOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.ServiceOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.ServiceOptions} ServiceOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ServiceOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.ServiceOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 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; + } + 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"; + 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"]); + 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"] = ""; + } + 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"]; + return object; + }; + + /** + * Converts this ServiceOptions to JSON. + * @function toJSON + * @memberof google.protobuf.ServiceOptions + * @instance + * @returns {Object.} JSON object + */ + ServiceOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ServiceOptions + * @function getTypeUrl + * @memberof google.protobuf.ServiceOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ServiceOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.ServiceOptions"; + }; + + return ServiceOptions; + })(); + + protobuf.MethodOptions = (function() { + + /** + * Properties of a MethodOptions. + * @memberof google.protobuf + * @interface IMethodOptions + * @property {boolean|null} [deprecated] MethodOptions deprecated + * @property {google.protobuf.MethodOptions.IdempotencyLevel|null} [idempotencyLevel] MethodOptions idempotencyLevel + * @property {google.protobuf.IFeatureSet|null} [features] MethodOptions features + * @property {Array.|null} [uninterpretedOption] MethodOptions uninterpretedOption + * @property {google.api.IHttpRule|null} [".google.api.http"] MethodOptions .google.api.http + * @property {Array.|null} [".google.api.methodSignature"] MethodOptions .google.api.methodSignature + */ + + /** + * Constructs a new MethodOptions. + * @memberof google.protobuf + * @classdesc Represents a MethodOptions. + * @implements IMethodOptions + * @constructor + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + */ + function MethodOptions(properties) { + this.uninterpretedOption = []; + this[".google.api.methodSignature"] = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * MethodOptions deprecated. + * @member {boolean} deprecated + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.deprecated = false; + + /** + * MethodOptions idempotencyLevel. + * @member {google.protobuf.MethodOptions.IdempotencyLevel} idempotencyLevel + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.idempotencyLevel = 0; + + /** + * MethodOptions features. + * @member {google.protobuf.IFeatureSet|null|undefined} features + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.features = null; + + /** + * MethodOptions uninterpretedOption. + * @member {Array.} uninterpretedOption + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype.uninterpretedOption = $util.emptyArray; + + /** + * MethodOptions .google.api.http. + * @member {google.api.IHttpRule|null|undefined} .google.api.http + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.http"] = null; + + /** + * MethodOptions .google.api.methodSignature. + * @member {Array.} .google.api.methodSignature + * @memberof google.protobuf.MethodOptions + * @instance + */ + MethodOptions.prototype[".google.api.methodSignature"] = $util.emptyArray; + + /** + * Creates a new MethodOptions instance using the specified properties. + * @function create + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions=} [properties] Properties to set + * @returns {google.protobuf.MethodOptions} MethodOptions instance + */ + MethodOptions.create = function create(properties) { + return new MethodOptions(properties); + }; + + /** + * Encodes the specified MethodOptions message. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encode + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.deprecated != null && Object.hasOwnProperty.call(message, "deprecated")) + writer.uint32(/* id 33, wireType 0 =*/264).bool(message.deprecated); + if (message.idempotencyLevel != null && Object.hasOwnProperty.call(message, "idempotencyLevel")) + writer.uint32(/* id 34, wireType 0 =*/272).int32(message.idempotencyLevel); + if (message.features != null && Object.hasOwnProperty.call(message, "features")) + $root.google.protobuf.FeatureSet.encode(message.features, writer.uint32(/* id 35, wireType 2 =*/282).fork()).ldelim(); + if (message.uninterpretedOption != null && message.uninterpretedOption.length) + for (var i = 0; i < message.uninterpretedOption.length; ++i) + $root.google.protobuf.UninterpretedOption.encode(message.uninterpretedOption[i], writer.uint32(/* id 999, wireType 2 =*/7994).fork()).ldelim(); + if (message[".google.api.methodSignature"] != null && message[".google.api.methodSignature"].length) + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + writer.uint32(/* id 1051, wireType 2 =*/8410).string(message[".google.api.methodSignature"][i]); + if (message[".google.api.http"] != null && Object.hasOwnProperty.call(message, ".google.api.http")) + $root.google.api.HttpRule.encode(message[".google.api.http"], writer.uint32(/* id 72295728, wireType 2 =*/578365826).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified MethodOptions message, length delimited. Does not implicitly {@link google.protobuf.MethodOptions.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.IMethodOptions} message MethodOptions message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + MethodOptions.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.MethodOptions(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 33: { + message.deprecated = reader.bool(); + break; + } + case 34: { + message.idempotencyLevel = reader.int32(); + break; + } + case 35: { + message.features = $root.google.protobuf.FeatureSet.decode(reader, reader.uint32()); + break; + } + case 999: { + if (!(message.uninterpretedOption && message.uninterpretedOption.length)) + message.uninterpretedOption = []; + message.uninterpretedOption.push($root.google.protobuf.UninterpretedOption.decode(reader, reader.uint32())); + break; + } + case 72295728: { + message[".google.api.http"] = $root.google.api.HttpRule.decode(reader, reader.uint32()); + break; + } + case 1051: { + if (!(message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length)) + message[".google.api.methodSignature"] = []; + message[".google.api.methodSignature"].push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a MethodOptions message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.MethodOptions + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.MethodOptions} MethodOptions + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + MethodOptions.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a MethodOptions message. + * @function verify + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + MethodOptions.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + if (typeof message.deprecated !== "boolean") + return "deprecated: boolean expected"; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + switch (message.idempotencyLevel) { + default: + return "idempotencyLevel: enum value expected"; + case 0: + case 1: + case 2: + break; + } + if (message.features != null && message.hasOwnProperty("features")) { + var error = $root.google.protobuf.FeatureSet.verify(message.features); + if (error) + return "features." + error; + } + if (message.uninterpretedOption != null && message.hasOwnProperty("uninterpretedOption")) { + if (!Array.isArray(message.uninterpretedOption)) + return "uninterpretedOption: array expected"; + for (var i = 0; i < message.uninterpretedOption.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.verify(message.uninterpretedOption[i]); + if (error) + return "uninterpretedOption." + error; + } + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) { + var error = $root.google.api.HttpRule.verify(message[".google.api.http"]); + if (error) + return ".google.api.http." + error; + } + if (message[".google.api.methodSignature"] != null && message.hasOwnProperty(".google.api.methodSignature")) { + if (!Array.isArray(message[".google.api.methodSignature"])) + return ".google.api.methodSignature: array expected"; + for (var i = 0; i < message[".google.api.methodSignature"].length; ++i) + if (!$util.isString(message[".google.api.methodSignature"][i])) + return ".google.api.methodSignature: string[] expected"; + } + return null; + }; + + /** + * Creates a MethodOptions message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.MethodOptions} MethodOptions + */ + MethodOptions.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.MethodOptions) + return object; + var message = new $root.google.protobuf.MethodOptions(); + if (object.deprecated != null) + message.deprecated = Boolean(object.deprecated); + switch (object.idempotencyLevel) { + default: + if (typeof object.idempotencyLevel === "number") { + message.idempotencyLevel = object.idempotencyLevel; + break; + } + break; + case "IDEMPOTENCY_UNKNOWN": + case 0: + message.idempotencyLevel = 0; + break; + case "NO_SIDE_EFFECTS": + case 1: + message.idempotencyLevel = 1; + break; + case "IDEMPOTENT": + case 2: + message.idempotencyLevel = 2; + break; + } + if (object.features != null) { + if (typeof object.features !== "object") + throw TypeError(".google.protobuf.MethodOptions.features: object expected"); + message.features = $root.google.protobuf.FeatureSet.fromObject(object.features); + } + if (object.uninterpretedOption) { + if (!Array.isArray(object.uninterpretedOption)) + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: array expected"); + message.uninterpretedOption = []; + for (var i = 0; i < object.uninterpretedOption.length; ++i) { + if (typeof object.uninterpretedOption[i] !== "object") + throw TypeError(".google.protobuf.MethodOptions.uninterpretedOption: object expected"); + message.uninterpretedOption[i] = $root.google.protobuf.UninterpretedOption.fromObject(object.uninterpretedOption[i]); + } + } + if (object[".google.api.http"] != null) { + if (typeof object[".google.api.http"] !== "object") + throw TypeError(".google.protobuf.MethodOptions..google.api.http: object expected"); + message[".google.api.http"] = $root.google.api.HttpRule.fromObject(object[".google.api.http"]); + } + if (object[".google.api.methodSignature"]) { + if (!Array.isArray(object[".google.api.methodSignature"])) + throw TypeError(".google.protobuf.MethodOptions..google.api.methodSignature: array expected"); + message[".google.api.methodSignature"] = []; + for (var i = 0; i < object[".google.api.methodSignature"].length; ++i) + message[".google.api.methodSignature"][i] = String(object[".google.api.methodSignature"][i]); + } + return message; + }; + + /** + * Creates a plain object from a MethodOptions message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.MethodOptions + * @static + * @param {google.protobuf.MethodOptions} message MethodOptions + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MethodOptions.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.uninterpretedOption = []; + object[".google.api.methodSignature"] = []; + } + if (options.defaults) { + object.deprecated = false; + object.idempotencyLevel = options.enums === String ? "IDEMPOTENCY_UNKNOWN" : 0; + object.features = null; + object[".google.api.http"] = null; + } + if (message.deprecated != null && message.hasOwnProperty("deprecated")) + object.deprecated = message.deprecated; + if (message.idempotencyLevel != null && message.hasOwnProperty("idempotencyLevel")) + object.idempotencyLevel = options.enums === String ? $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] === undefined ? message.idempotencyLevel : $root.google.protobuf.MethodOptions.IdempotencyLevel[message.idempotencyLevel] : message.idempotencyLevel; + if (message.features != null && message.hasOwnProperty("features")) + object.features = $root.google.protobuf.FeatureSet.toObject(message.features, options); + if (message.uninterpretedOption && message.uninterpretedOption.length) { + object.uninterpretedOption = []; + for (var j = 0; j < message.uninterpretedOption.length; ++j) + object.uninterpretedOption[j] = $root.google.protobuf.UninterpretedOption.toObject(message.uninterpretedOption[j], options); + } + if (message[".google.api.methodSignature"] && message[".google.api.methodSignature"].length) { + object[".google.api.methodSignature"] = []; + for (var j = 0; j < message[".google.api.methodSignature"].length; ++j) + object[".google.api.methodSignature"][j] = message[".google.api.methodSignature"][j]; + } + if (message[".google.api.http"] != null && message.hasOwnProperty(".google.api.http")) + object[".google.api.http"] = $root.google.api.HttpRule.toObject(message[".google.api.http"], options); + return object; + }; + + /** + * Converts this MethodOptions to JSON. + * @function toJSON + * @memberof google.protobuf.MethodOptions + * @instance + * @returns {Object.} JSON object + */ + MethodOptions.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MethodOptions + * @function getTypeUrl + * @memberof google.protobuf.MethodOptions + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MethodOptions.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.MethodOptions"; + }; + + /** + * IdempotencyLevel enum. + * @name google.protobuf.MethodOptions.IdempotencyLevel + * @enum {number} + * @property {number} IDEMPOTENCY_UNKNOWN=0 IDEMPOTENCY_UNKNOWN value + * @property {number} NO_SIDE_EFFECTS=1 NO_SIDE_EFFECTS value + * @property {number} IDEMPOTENT=2 IDEMPOTENT value + */ + MethodOptions.IdempotencyLevel = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "IDEMPOTENCY_UNKNOWN"] = 0; + values[valuesById[1] = "NO_SIDE_EFFECTS"] = 1; + values[valuesById[2] = "IDEMPOTENT"] = 2; + return values; + })(); + + return MethodOptions; + })(); + + protobuf.UninterpretedOption = (function() { + + /** + * Properties of an UninterpretedOption. + * @memberof google.protobuf + * @interface IUninterpretedOption + * @property {Array.|null} [name] UninterpretedOption name + * @property {string|null} [identifierValue] UninterpretedOption identifierValue + * @property {number|Long|null} [positiveIntValue] UninterpretedOption positiveIntValue + * @property {number|Long|null} [negativeIntValue] UninterpretedOption negativeIntValue + * @property {number|null} [doubleValue] UninterpretedOption doubleValue + * @property {Uint8Array|null} [stringValue] UninterpretedOption stringValue + * @property {string|null} [aggregateValue] UninterpretedOption aggregateValue + */ + + /** + * Constructs a new UninterpretedOption. + * @memberof google.protobuf + * @classdesc Represents an UninterpretedOption. + * @implements IUninterpretedOption + * @constructor + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + */ + function UninterpretedOption(properties) { + this.name = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * UninterpretedOption name. + * @member {Array.} name + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.name = $util.emptyArray; + + /** + * UninterpretedOption identifierValue. + * @member {string} identifierValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.identifierValue = ""; + + /** + * UninterpretedOption positiveIntValue. + * @member {number|Long} positiveIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.positiveIntValue = $util.Long ? $util.Long.fromBits(0,0,true) : 0; + + /** + * UninterpretedOption negativeIntValue. + * @member {number|Long} negativeIntValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.negativeIntValue = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * UninterpretedOption doubleValue. + * @member {number} doubleValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.doubleValue = 0; + + /** + * UninterpretedOption stringValue. + * @member {Uint8Array} stringValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.stringValue = $util.newBuffer([]); + + /** + * UninterpretedOption aggregateValue. + * @member {string} aggregateValue + * @memberof google.protobuf.UninterpretedOption + * @instance + */ + UninterpretedOption.prototype.aggregateValue = ""; + + /** + * Creates a new UninterpretedOption instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption instance + */ + UninterpretedOption.create = function create(properties) { + return new UninterpretedOption(properties); + }; + + /** + * Encodes the specified UninterpretedOption message. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.name != null && message.name.length) + for (var i = 0; i < message.name.length; ++i) + $root.google.protobuf.UninterpretedOption.NamePart.encode(message.name[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.identifierValue != null && Object.hasOwnProperty.call(message, "identifierValue")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.identifierValue); + if (message.positiveIntValue != null && Object.hasOwnProperty.call(message, "positiveIntValue")) + writer.uint32(/* id 4, wireType 0 =*/32).uint64(message.positiveIntValue); + if (message.negativeIntValue != null && Object.hasOwnProperty.call(message, "negativeIntValue")) + writer.uint32(/* id 5, wireType 0 =*/40).int64(message.negativeIntValue); + if (message.doubleValue != null && Object.hasOwnProperty.call(message, "doubleValue")) + writer.uint32(/* id 6, wireType 1 =*/49).double(message.doubleValue); + if (message.stringValue != null && Object.hasOwnProperty.call(message, "stringValue")) + writer.uint32(/* id 7, wireType 2 =*/58).bytes(message.stringValue); + if (message.aggregateValue != null && Object.hasOwnProperty.call(message, "aggregateValue")) + writer.uint32(/* id 8, wireType 2 =*/66).string(message.aggregateValue); + return writer; + }; + + /** + * Encodes the specified UninterpretedOption message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.IUninterpretedOption} message UninterpretedOption message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + UninterpretedOption.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + if (!(message.name && message.name.length)) + message.name = []; + message.name.push($root.google.protobuf.UninterpretedOption.NamePart.decode(reader, reader.uint32())); + break; + } + case 3: { + message.identifierValue = reader.string(); + break; + } + case 4: { + message.positiveIntValue = reader.uint64(); + break; + } + case 5: { + message.negativeIntValue = reader.int64(); + break; + } + case 6: { + message.doubleValue = reader.double(); + break; + } + case 7: { + message.stringValue = reader.bytes(); + break; + } + case 8: { + message.aggregateValue = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an UninterpretedOption message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + UninterpretedOption.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an UninterpretedOption message. + * @function verify + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + UninterpretedOption.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.name != null && message.hasOwnProperty("name")) { + if (!Array.isArray(message.name)) + return "name: array expected"; + for (var i = 0; i < message.name.length; ++i) { + var error = $root.google.protobuf.UninterpretedOption.NamePart.verify(message.name[i]); + if (error) + return "name." + error; + } + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + if (!$util.isString(message.identifierValue)) + return "identifierValue: string expected"; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (!$util.isInteger(message.positiveIntValue) && !(message.positiveIntValue && $util.isInteger(message.positiveIntValue.low) && $util.isInteger(message.positiveIntValue.high))) + return "positiveIntValue: integer|Long expected"; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (!$util.isInteger(message.negativeIntValue) && !(message.negativeIntValue && $util.isInteger(message.negativeIntValue.low) && $util.isInteger(message.negativeIntValue.high))) + return "negativeIntValue: integer|Long expected"; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + if (typeof message.doubleValue !== "number") + return "doubleValue: number expected"; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + if (!(message.stringValue && typeof message.stringValue.length === "number" || $util.isString(message.stringValue))) + return "stringValue: buffer expected"; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + if (!$util.isString(message.aggregateValue)) + return "aggregateValue: string expected"; + return null; + }; + + /** + * Creates an UninterpretedOption message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption} UninterpretedOption + */ + UninterpretedOption.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption) + return object; + var message = new $root.google.protobuf.UninterpretedOption(); + if (object.name) { + if (!Array.isArray(object.name)) + throw TypeError(".google.protobuf.UninterpretedOption.name: array expected"); + message.name = []; + for (var i = 0; i < object.name.length; ++i) { + if (typeof object.name[i] !== "object") + throw TypeError(".google.protobuf.UninterpretedOption.name: object expected"); + message.name[i] = $root.google.protobuf.UninterpretedOption.NamePart.fromObject(object.name[i]); + } + } + if (object.identifierValue != null) + message.identifierValue = String(object.identifierValue); + if (object.positiveIntValue != null) + if ($util.Long) + (message.positiveIntValue = $util.Long.fromValue(object.positiveIntValue)).unsigned = true; + else if (typeof object.positiveIntValue === "string") + message.positiveIntValue = parseInt(object.positiveIntValue, 10); + else if (typeof object.positiveIntValue === "number") + message.positiveIntValue = object.positiveIntValue; + else if (typeof object.positiveIntValue === "object") + message.positiveIntValue = new $util.LongBits(object.positiveIntValue.low >>> 0, object.positiveIntValue.high >>> 0).toNumber(true); + if (object.negativeIntValue != null) + if ($util.Long) + (message.negativeIntValue = $util.Long.fromValue(object.negativeIntValue)).unsigned = false; + else if (typeof object.negativeIntValue === "string") + message.negativeIntValue = parseInt(object.negativeIntValue, 10); + else if (typeof object.negativeIntValue === "number") + message.negativeIntValue = object.negativeIntValue; + else if (typeof object.negativeIntValue === "object") + message.negativeIntValue = new $util.LongBits(object.negativeIntValue.low >>> 0, object.negativeIntValue.high >>> 0).toNumber(); + if (object.doubleValue != null) + message.doubleValue = Number(object.doubleValue); + if (object.stringValue != null) + if (typeof object.stringValue === "string") + $util.base64.decode(object.stringValue, message.stringValue = $util.newBuffer($util.base64.length(object.stringValue)), 0); + else if (object.stringValue.length >= 0) + message.stringValue = object.stringValue; + if (object.aggregateValue != null) + message.aggregateValue = String(object.aggregateValue); + return message; + }; + + /** + * Creates a plain object from an UninterpretedOption message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {google.protobuf.UninterpretedOption} message UninterpretedOption + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + UninterpretedOption.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.name = []; + if (options.defaults) { + object.identifierValue = ""; + if ($util.Long) { + var long = new $util.Long(0, 0, true); + object.positiveIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.positiveIntValue = options.longs === String ? "0" : 0; + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.negativeIntValue = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.negativeIntValue = options.longs === String ? "0" : 0; + object.doubleValue = 0; + if (options.bytes === String) + object.stringValue = ""; + else { + object.stringValue = []; + if (options.bytes !== Array) + object.stringValue = $util.newBuffer(object.stringValue); + } + object.aggregateValue = ""; + } + if (message.name && message.name.length) { + object.name = []; + for (var j = 0; j < message.name.length; ++j) + object.name[j] = $root.google.protobuf.UninterpretedOption.NamePart.toObject(message.name[j], options); + } + if (message.identifierValue != null && message.hasOwnProperty("identifierValue")) + object.identifierValue = message.identifierValue; + if (message.positiveIntValue != null && message.hasOwnProperty("positiveIntValue")) + if (typeof message.positiveIntValue === "number") + object.positiveIntValue = options.longs === String ? String(message.positiveIntValue) : message.positiveIntValue; + else + object.positiveIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.positiveIntValue) : options.longs === Number ? new $util.LongBits(message.positiveIntValue.low >>> 0, message.positiveIntValue.high >>> 0).toNumber(true) : message.positiveIntValue; + if (message.negativeIntValue != null && message.hasOwnProperty("negativeIntValue")) + if (typeof message.negativeIntValue === "number") + object.negativeIntValue = options.longs === String ? String(message.negativeIntValue) : message.negativeIntValue; + else + object.negativeIntValue = options.longs === String ? $util.Long.prototype.toString.call(message.negativeIntValue) : options.longs === Number ? new $util.LongBits(message.negativeIntValue.low >>> 0, message.negativeIntValue.high >>> 0).toNumber() : message.negativeIntValue; + if (message.doubleValue != null && message.hasOwnProperty("doubleValue")) + object.doubleValue = options.json && !isFinite(message.doubleValue) ? String(message.doubleValue) : message.doubleValue; + if (message.stringValue != null && message.hasOwnProperty("stringValue")) + object.stringValue = options.bytes === String ? $util.base64.encode(message.stringValue, 0, message.stringValue.length) : options.bytes === Array ? Array.prototype.slice.call(message.stringValue) : message.stringValue; + if (message.aggregateValue != null && message.hasOwnProperty("aggregateValue")) + object.aggregateValue = message.aggregateValue; + return object; + }; + + /** + * Converts this UninterpretedOption to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption + * @instance + * @returns {Object.} JSON object + */ + UninterpretedOption.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for UninterpretedOption + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + UninterpretedOption.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption"; + }; + + UninterpretedOption.NamePart = (function() { + + /** + * Properties of a NamePart. + * @memberof google.protobuf.UninterpretedOption + * @interface INamePart + * @property {string} namePart NamePart namePart + * @property {boolean} isExtension NamePart isExtension + */ + + /** + * Constructs a new NamePart. + * @memberof google.protobuf.UninterpretedOption + * @classdesc Represents a NamePart. + * @implements INamePart + * @constructor + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + */ + function NamePart(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NamePart namePart. + * @member {string} namePart + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.namePart = ""; + + /** + * NamePart isExtension. + * @member {boolean} isExtension + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + */ + NamePart.prototype.isExtension = false; + + /** + * Creates a new NamePart instance using the specified properties. + * @function create + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart=} [properties] Properties to set + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart instance + */ + NamePart.create = function create(properties) { + return new NamePart(properties); + }; + + /** + * Encodes the specified NamePart message. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + writer.uint32(/* id 1, wireType 2 =*/10).string(message.namePart); + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.isExtension); + return writer; + }; + + /** + * Encodes the specified NamePart message, length delimited. Does not implicitly {@link google.protobuf.UninterpretedOption.NamePart.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.INamePart} message NamePart message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NamePart.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NamePart message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.UninterpretedOption.NamePart(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.namePart = reader.string(); + break; + } + case 2: { + message.isExtension = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + if (!message.hasOwnProperty("namePart")) + throw $util.ProtocolError("missing required 'namePart'", { instance: message }); + if (!message.hasOwnProperty("isExtension")) + throw $util.ProtocolError("missing required 'isExtension'", { instance: message }); + return message; + }; + + /** + * Decodes a NamePart message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NamePart.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NamePart message. + * @function verify + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NamePart.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (!$util.isString(message.namePart)) + return "namePart: string expected"; + if (typeof message.isExtension !== "boolean") + return "isExtension: boolean expected"; + return null; + }; + + /** + * Creates a NamePart message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.UninterpretedOption.NamePart} NamePart + */ + NamePart.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.UninterpretedOption.NamePart) + return object; + var message = new $root.google.protobuf.UninterpretedOption.NamePart(); + if (object.namePart != null) + message.namePart = String(object.namePart); + if (object.isExtension != null) + message.isExtension = Boolean(object.isExtension); + return message; + }; + + /** + * Creates a plain object from a NamePart message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {google.protobuf.UninterpretedOption.NamePart} message NamePart + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NamePart.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.namePart = ""; + object.isExtension = false; + } + if (message.namePart != null && message.hasOwnProperty("namePart")) + object.namePart = message.namePart; + if (message.isExtension != null && message.hasOwnProperty("isExtension")) + object.isExtension = message.isExtension; + return object; + }; + + /** + * Converts this NamePart to JSON. + * @function toJSON + * @memberof google.protobuf.UninterpretedOption.NamePart + * @instance + * @returns {Object.} JSON object + */ + NamePart.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NamePart + * @function getTypeUrl + * @memberof google.protobuf.UninterpretedOption.NamePart + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NamePart.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.UninterpretedOption.NamePart"; + }; + + return NamePart; + })(); + + return UninterpretedOption; + })(); + + protobuf.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) { + 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(); + 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) { + 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(); + 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) { + 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(); + 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) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.location && message.location.length)) + message.location = []; + message.location.push($root.google.protobuf.SourceCodeInfo.Location.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SourceCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SourceCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SourceCodeInfo message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SourceCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.location != null && message.hasOwnProperty("location")) { + if (!Array.isArray(message.location)) + return "location: array expected"; + for (var i = 0; i < message.location.length; ++i) { + var error = $root.google.protobuf.SourceCodeInfo.Location.verify(message.location[i]); + if (error) + return "location." + error; + } + } + return null; + }; + + /** + * Creates a SourceCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo} SourceCodeInfo + */ + SourceCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo) + return object; + var message = new $root.google.protobuf.SourceCodeInfo(); + if (object.location) { + if (!Array.isArray(object.location)) + throw TypeError(".google.protobuf.SourceCodeInfo.location: array expected"); + message.location = []; + for (var i = 0; i < object.location.length; ++i) { + if (typeof object.location[i] !== "object") + throw TypeError(".google.protobuf.SourceCodeInfo.location: object expected"); + message.location[i] = $root.google.protobuf.SourceCodeInfo.Location.fromObject(object.location[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a SourceCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {google.protobuf.SourceCodeInfo} message SourceCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SourceCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.location = []; + if (message.location && message.location.length) { + object.location = []; + for (var j = 0; j < message.location.length; ++j) + object.location[j] = $root.google.protobuf.SourceCodeInfo.Location.toObject(message.location[j], options); + } + return object; + }; + + /** + * Converts this SourceCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo + * @instance + * @returns {Object.} JSON object + */ + SourceCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SourceCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SourceCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo"; + }; + + SourceCodeInfo.Location = (function() { + + /** + * Properties of a Location. + * @memberof google.protobuf.SourceCodeInfo + * @interface ILocation + * @property {Array.|null} [path] Location path + * @property {Array.|null} [span] Location span + * @property {string|null} [leadingComments] Location leadingComments + * @property {string|null} [trailingComments] Location trailingComments + * @property {Array.|null} [leadingDetachedComments] Location leadingDetachedComments + */ + + /** + * Constructs a new Location. + * @memberof google.protobuf.SourceCodeInfo + * @classdesc Represents a Location. + * @implements ILocation + * @constructor + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + */ + function Location(properties) { + this.path = []; + this.span = []; + this.leadingDetachedComments = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Location path. + * @member {Array.} path + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.path = $util.emptyArray; + + /** + * Location span. + * @member {Array.} span + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.span = $util.emptyArray; + + /** + * Location leadingComments. + * @member {string} leadingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingComments = ""; + + /** + * Location trailingComments. + * @member {string} trailingComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.trailingComments = ""; + + /** + * Location leadingDetachedComments. + * @member {Array.} leadingDetachedComments + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + */ + Location.prototype.leadingDetachedComments = $util.emptyArray; + + /** + * Creates a new Location instance using the specified properties. + * @function create + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation=} [properties] Properties to set + * @returns {google.protobuf.SourceCodeInfo.Location} Location instance + */ + Location.create = function create(properties) { + return new Location(properties); + }; + + /** + * Encodes the specified Location message. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.span != null && message.span.length) { + writer.uint32(/* id 2, wireType 2 =*/18).fork(); + for (var i = 0; i < message.span.length; ++i) + writer.int32(message.span[i]); + writer.ldelim(); + } + if (message.leadingComments != null && Object.hasOwnProperty.call(message, "leadingComments")) + writer.uint32(/* id 3, wireType 2 =*/26).string(message.leadingComments); + if (message.trailingComments != null && Object.hasOwnProperty.call(message, "trailingComments")) + writer.uint32(/* id 4, wireType 2 =*/34).string(message.trailingComments); + if (message.leadingDetachedComments != null && message.leadingDetachedComments.length) + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.leadingDetachedComments[i]); + return writer; + }; + + /** + * Encodes the specified Location message, length delimited. Does not implicitly {@link google.protobuf.SourceCodeInfo.Location.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.ILocation} message Location message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Location.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Location message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.SourceCodeInfo.Location(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + if (!(message.span && message.span.length)) + message.span = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.span.push(reader.int32()); + } else + message.span.push(reader.int32()); + break; + } + case 3: { + message.leadingComments = reader.string(); + break; + } + case 4: { + message.trailingComments = reader.string(); + break; + } + case 6: { + if (!(message.leadingDetachedComments && message.leadingDetachedComments.length)) + message.leadingDetachedComments = []; + message.leadingDetachedComments.push(reader.string()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Location message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.SourceCodeInfo.Location} Location + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Location.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Location message. + * @function verify + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Location.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.span != null && message.hasOwnProperty("span")) { + if (!Array.isArray(message.span)) + return "span: array expected"; + for (var i = 0; i < message.span.length; ++i) + if (!$util.isInteger(message.span[i])) + return "span: integer[] expected"; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + if (!$util.isString(message.leadingComments)) + return "leadingComments: string expected"; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + if (!$util.isString(message.trailingComments)) + return "trailingComments: string expected"; + if (message.leadingDetachedComments != null && message.hasOwnProperty("leadingDetachedComments")) { + if (!Array.isArray(message.leadingDetachedComments)) + return "leadingDetachedComments: array expected"; + for (var i = 0; i < message.leadingDetachedComments.length; ++i) + if (!$util.isString(message.leadingDetachedComments[i])) + return "leadingDetachedComments: string[] expected"; + } + return null; + }; + + /** + * Creates a Location message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.SourceCodeInfo.Location} Location + */ + Location.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.SourceCodeInfo.Location) + return object; + var message = new $root.google.protobuf.SourceCodeInfo.Location(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.span) { + if (!Array.isArray(object.span)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.span: array expected"); + message.span = []; + for (var i = 0; i < object.span.length; ++i) + message.span[i] = object.span[i] | 0; + } + if (object.leadingComments != null) + message.leadingComments = String(object.leadingComments); + if (object.trailingComments != null) + message.trailingComments = String(object.trailingComments); + if (object.leadingDetachedComments) { + if (!Array.isArray(object.leadingDetachedComments)) + throw TypeError(".google.protobuf.SourceCodeInfo.Location.leadingDetachedComments: array expected"); + message.leadingDetachedComments = []; + for (var i = 0; i < object.leadingDetachedComments.length; ++i) + message.leadingDetachedComments[i] = String(object.leadingDetachedComments[i]); + } + return message; + }; + + /** + * Creates a plain object from a Location message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {google.protobuf.SourceCodeInfo.Location} message Location + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Location.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) { + object.path = []; + object.span = []; + object.leadingDetachedComments = []; + } + if (options.defaults) { + object.leadingComments = ""; + object.trailingComments = ""; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.span && message.span.length) { + object.span = []; + for (var j = 0; j < message.span.length; ++j) + object.span[j] = message.span[j]; + } + if (message.leadingComments != null && message.hasOwnProperty("leadingComments")) + object.leadingComments = message.leadingComments; + if (message.trailingComments != null && message.hasOwnProperty("trailingComments")) + object.trailingComments = message.trailingComments; + if (message.leadingDetachedComments && message.leadingDetachedComments.length) { + object.leadingDetachedComments = []; + for (var j = 0; j < message.leadingDetachedComments.length; ++j) + object.leadingDetachedComments[j] = message.leadingDetachedComments[j]; + } + return object; + }; + + /** + * Converts this Location to JSON. + * @function toJSON + * @memberof google.protobuf.SourceCodeInfo.Location + * @instance + * @returns {Object.} JSON object + */ + Location.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Location + * @function getTypeUrl + * @memberof google.protobuf.SourceCodeInfo.Location + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Location.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.SourceCodeInfo.Location"; + }; + + return Location; + })(); + + return SourceCodeInfo; + })(); + + protobuf.GeneratedCodeInfo = (function() { + + /** + * Properties of a GeneratedCodeInfo. + * @memberof google.protobuf + * @interface IGeneratedCodeInfo + * @property {Array.|null} [annotation] GeneratedCodeInfo annotation + */ + + /** + * Constructs a new GeneratedCodeInfo. + * @memberof google.protobuf + * @classdesc Represents a GeneratedCodeInfo. + * @implements IGeneratedCodeInfo + * @constructor + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + */ + function GeneratedCodeInfo(properties) { + this.annotation = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * GeneratedCodeInfo annotation. + * @member {Array.} annotation + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + */ + GeneratedCodeInfo.prototype.annotation = $util.emptyArray; + + /** + * Creates a new GeneratedCodeInfo instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo instance + */ + GeneratedCodeInfo.create = function create(properties) { + return new GeneratedCodeInfo(properties); + }; + + /** + * Encodes the specified GeneratedCodeInfo message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.annotation != null && message.annotation.length) + for (var i = 0; i < message.annotation.length; ++i) + $root.google.protobuf.GeneratedCodeInfo.Annotation.encode(message.annotation[i], writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified GeneratedCodeInfo message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.IGeneratedCodeInfo} message GeneratedCodeInfo message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + GeneratedCodeInfo.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.annotation && message.annotation.length)) + message.annotation = []; + message.annotation.push($root.google.protobuf.GeneratedCodeInfo.Annotation.decode(reader, reader.uint32())); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a GeneratedCodeInfo message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + GeneratedCodeInfo.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a GeneratedCodeInfo message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + GeneratedCodeInfo.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.annotation != null && message.hasOwnProperty("annotation")) { + if (!Array.isArray(message.annotation)) + return "annotation: array expected"; + for (var i = 0; i < message.annotation.length; ++i) { + var error = $root.google.protobuf.GeneratedCodeInfo.Annotation.verify(message.annotation[i]); + if (error) + return "annotation." + error; + } + } + return null; + }; + + /** + * Creates a GeneratedCodeInfo message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo} GeneratedCodeInfo + */ + GeneratedCodeInfo.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo(); + if (object.annotation) { + if (!Array.isArray(object.annotation)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: array expected"); + message.annotation = []; + for (var i = 0; i < object.annotation.length; ++i) { + if (typeof object.annotation[i] !== "object") + throw TypeError(".google.protobuf.GeneratedCodeInfo.annotation: object expected"); + message.annotation[i] = $root.google.protobuf.GeneratedCodeInfo.Annotation.fromObject(object.annotation[i]); + } + } + return message; + }; + + /** + * Creates a plain object from a GeneratedCodeInfo message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {google.protobuf.GeneratedCodeInfo} message GeneratedCodeInfo + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + GeneratedCodeInfo.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.annotation = []; + if (message.annotation && message.annotation.length) { + object.annotation = []; + for (var j = 0; j < message.annotation.length; ++j) + object.annotation[j] = $root.google.protobuf.GeneratedCodeInfo.Annotation.toObject(message.annotation[j], options); + } + return object; + }; + + /** + * Converts this GeneratedCodeInfo to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo + * @instance + * @returns {Object.} JSON object + */ + GeneratedCodeInfo.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for GeneratedCodeInfo + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + GeneratedCodeInfo.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo"; + }; + + GeneratedCodeInfo.Annotation = (function() { + + /** + * Properties of an Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @interface IAnnotation + * @property {Array.|null} [path] Annotation path + * @property {string|null} [sourceFile] Annotation sourceFile + * @property {number|null} [begin] Annotation begin + * @property {number|null} [end] Annotation end + * @property {google.protobuf.GeneratedCodeInfo.Annotation.Semantic|null} [semantic] Annotation semantic + */ + + /** + * Constructs a new Annotation. + * @memberof google.protobuf.GeneratedCodeInfo + * @classdesc Represents an Annotation. + * @implements IAnnotation + * @constructor + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + */ + function Annotation(properties) { + this.path = []; + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Annotation path. + * @member {Array.} path + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.path = $util.emptyArray; + + /** + * Annotation sourceFile. + * @member {string} sourceFile + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.sourceFile = ""; + + /** + * Annotation begin. + * @member {number} begin + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.begin = 0; + + /** + * Annotation end. + * @member {number} end + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.end = 0; + + /** + * Annotation semantic. + * @member {google.protobuf.GeneratedCodeInfo.Annotation.Semantic} semantic + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + */ + Annotation.prototype.semantic = 0; + + /** + * Creates a new Annotation instance using the specified properties. + * @function create + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation=} [properties] Properties to set + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation instance + */ + Annotation.create = function create(properties) { + return new Annotation(properties); + }; + + /** + * Encodes the specified Annotation message. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.path != null && message.path.length) { + writer.uint32(/* id 1, wireType 2 =*/10).fork(); + for (var i = 0; i < message.path.length; ++i) + writer.int32(message.path[i]); + writer.ldelim(); + } + if (message.sourceFile != null && Object.hasOwnProperty.call(message, "sourceFile")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.sourceFile); + if (message.begin != null && Object.hasOwnProperty.call(message, "begin")) + writer.uint32(/* id 3, wireType 0 =*/24).int32(message.begin); + if (message.end != null && Object.hasOwnProperty.call(message, "end")) + writer.uint32(/* id 4, wireType 0 =*/32).int32(message.end); + if (message.semantic != null && Object.hasOwnProperty.call(message, "semantic")) + writer.uint32(/* id 5, wireType 0 =*/40).int32(message.semantic); + return writer; + }; + + /** + * Encodes the specified Annotation message, length delimited. Does not implicitly {@link google.protobuf.GeneratedCodeInfo.Annotation.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.IAnnotation} message Annotation message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Annotation.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Annotation message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + if (!(message.path && message.path.length)) + message.path = []; + if ((tag & 7) === 2) { + var end2 = reader.uint32() + reader.pos; + while (reader.pos < end2) + message.path.push(reader.int32()); + } else + message.path.push(reader.int32()); + break; + } + case 2: { + message.sourceFile = reader.string(); + break; + } + case 3: { + message.begin = reader.int32(); + break; + } + case 4: { + message.end = reader.int32(); + break; + } + case 5: { + message.semantic = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Annotation message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Annotation.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Annotation message. + * @function verify + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Annotation.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.path != null && message.hasOwnProperty("path")) { + if (!Array.isArray(message.path)) + return "path: array expected"; + for (var i = 0; i < message.path.length; ++i) + if (!$util.isInteger(message.path[i])) + return "path: integer[] expected"; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + if (!$util.isString(message.sourceFile)) + return "sourceFile: string expected"; + if (message.begin != null && message.hasOwnProperty("begin")) + if (!$util.isInteger(message.begin)) + return "begin: integer expected"; + if (message.end != null && message.hasOwnProperty("end")) + if (!$util.isInteger(message.end)) + return "end: integer expected"; + if (message.semantic != null && message.hasOwnProperty("semantic")) + switch (message.semantic) { + default: + return "semantic: enum value expected"; + case 0: + case 1: + case 2: + break; + } + return null; + }; + + /** + * Creates an Annotation message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.GeneratedCodeInfo.Annotation} Annotation + */ + Annotation.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.GeneratedCodeInfo.Annotation) + return object; + var message = new $root.google.protobuf.GeneratedCodeInfo.Annotation(); + if (object.path) { + if (!Array.isArray(object.path)) + throw TypeError(".google.protobuf.GeneratedCodeInfo.Annotation.path: array expected"); + message.path = []; + for (var i = 0; i < object.path.length; ++i) + message.path[i] = object.path[i] | 0; + } + if (object.sourceFile != null) + message.sourceFile = String(object.sourceFile); + if (object.begin != null) + message.begin = object.begin | 0; + if (object.end != null) + message.end = object.end | 0; + switch (object.semantic) { + default: + if (typeof object.semantic === "number") { + message.semantic = object.semantic; + break; + } + break; + case "NONE": + case 0: + message.semantic = 0; + break; + case "SET": + case 1: + message.semantic = 1; + break; + case "ALIAS": + case 2: + message.semantic = 2; + break; + } + return message; + }; + + /** + * Creates a plain object from an Annotation message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {google.protobuf.GeneratedCodeInfo.Annotation} message Annotation + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Annotation.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.path = []; + if (options.defaults) { + object.sourceFile = ""; + object.begin = 0; + object.end = 0; + object.semantic = options.enums === String ? "NONE" : 0; + } + if (message.path && message.path.length) { + object.path = []; + for (var j = 0; j < message.path.length; ++j) + object.path[j] = message.path[j]; + } + if (message.sourceFile != null && message.hasOwnProperty("sourceFile")) + object.sourceFile = message.sourceFile; + if (message.begin != null && message.hasOwnProperty("begin")) + object.begin = message.begin; + if (message.end != null && message.hasOwnProperty("end")) + object.end = message.end; + if (message.semantic != null && message.hasOwnProperty("semantic")) + object.semantic = options.enums === String ? $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] === undefined ? message.semantic : $root.google.protobuf.GeneratedCodeInfo.Annotation.Semantic[message.semantic] : message.semantic; + return object; + }; + + /** + * Converts this Annotation to JSON. + * @function toJSON + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @instance + * @returns {Object.} JSON object + */ + Annotation.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Annotation + * @function getTypeUrl + * @memberof google.protobuf.GeneratedCodeInfo.Annotation + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Annotation.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.GeneratedCodeInfo.Annotation"; + }; + + /** + * Semantic enum. + * @name google.protobuf.GeneratedCodeInfo.Annotation.Semantic + * @enum {number} + * @property {number} NONE=0 NONE value + * @property {number} SET=1 SET value + * @property {number} ALIAS=2 ALIAS value + */ + Annotation.Semantic = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NONE"] = 0; + values[valuesById[1] = "SET"] = 1; + values[valuesById[2] = "ALIAS"] = 2; + return values; + })(); + + return Annotation; + })(); + + return GeneratedCodeInfo; + })(); + + protobuf.Duration = (function() { + + /** + * Properties of a Duration. + * @memberof google.protobuf + * @interface IDuration + * @property {number|Long|null} [seconds] Duration seconds + * @property {number|null} [nanos] Duration nanos + */ + + /** + * Constructs a new Duration. + * @memberof google.protobuf + * @classdesc Represents a Duration. + * @implements IDuration + * @constructor + * @param {google.protobuf.IDuration=} [properties] Properties to set + */ + function Duration(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Duration seconds. + * @member {number|Long} seconds + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.seconds = $util.Long ? $util.Long.fromBits(0,0,false) : 0; + + /** + * Duration nanos. + * @member {number} nanos + * @memberof google.protobuf.Duration + * @instance + */ + Duration.prototype.nanos = 0; + + /** + * Creates a new Duration instance using the specified properties. + * @function create + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration=} [properties] Properties to set + * @returns {google.protobuf.Duration} Duration instance + */ + Duration.create = function create(properties) { + return new Duration(properties); + }; + + /** + * Encodes the specified Duration message. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.seconds != null && Object.hasOwnProperty.call(message, "seconds")) + writer.uint32(/* id 1, wireType 0 =*/8).int64(message.seconds); + if (message.nanos != null && Object.hasOwnProperty.call(message, "nanos")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.nanos); + return writer; + }; + + /** + * Encodes the specified Duration message, length delimited. Does not implicitly {@link google.protobuf.Duration.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.IDuration} message Duration message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Duration.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Duration message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Duration(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.seconds = reader.int64(); + break; + } + case 2: { + message.nanos = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Duration message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Duration + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Duration} Duration + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Duration.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Duration message. + * @function verify + * @memberof google.protobuf.Duration + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Duration.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (!$util.isInteger(message.seconds) && !(message.seconds && $util.isInteger(message.seconds.low) && $util.isInteger(message.seconds.high))) + return "seconds: integer|Long expected"; + if (message.nanos != null && message.hasOwnProperty("nanos")) + if (!$util.isInteger(message.nanos)) + return "nanos: integer expected"; + return null; + }; + + /** + * Creates a Duration message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Duration + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Duration} Duration + */ + Duration.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Duration) + return object; + var message = new $root.google.protobuf.Duration(); + if (object.seconds != null) + if ($util.Long) + (message.seconds = $util.Long.fromValue(object.seconds)).unsigned = false; + else if (typeof object.seconds === "string") + message.seconds = parseInt(object.seconds, 10); + else if (typeof object.seconds === "number") + message.seconds = object.seconds; + else if (typeof object.seconds === "object") + message.seconds = new $util.LongBits(object.seconds.low >>> 0, object.seconds.high >>> 0).toNumber(); + if (object.nanos != null) + message.nanos = object.nanos | 0; + return message; + }; + + /** + * Creates a plain object from a Duration message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Duration + * @static + * @param {google.protobuf.Duration} message Duration + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Duration.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + if ($util.Long) { + var long = new $util.Long(0, 0, false); + object.seconds = options.longs === String ? long.toString() : options.longs === Number ? long.toNumber() : long; + } else + object.seconds = options.longs === String ? "0" : 0; + object.nanos = 0; + } + if (message.seconds != null && message.hasOwnProperty("seconds")) + if (typeof message.seconds === "number") + object.seconds = options.longs === String ? String(message.seconds) : message.seconds; + else + object.seconds = options.longs === String ? $util.Long.prototype.toString.call(message.seconds) : options.longs === Number ? new $util.LongBits(message.seconds.low >>> 0, message.seconds.high >>> 0).toNumber() : message.seconds; + if (message.nanos != null && message.hasOwnProperty("nanos")) + object.nanos = message.nanos; + return object; + }; + + /** + * Converts this Duration to JSON. + * @function toJSON + * @memberof google.protobuf.Duration + * @instance + * @returns {Object.} JSON object + */ + Duration.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Duration + * @function getTypeUrl + * @memberof google.protobuf.Duration + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Duration.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Duration"; + }; + + return Duration; + })(); + + protobuf.Empty = (function() { + + /** + * Properties of an Empty. + * @memberof google.protobuf + * @interface IEmpty + */ + + /** + * Constructs a new Empty. + * @memberof google.protobuf + * @classdesc Represents an Empty. + * @implements IEmpty + * @constructor + * @param {google.protobuf.IEmpty=} [properties] Properties to set + */ + function Empty(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Creates a new Empty instance using the specified properties. + * @function create + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty=} [properties] Properties to set + * @returns {google.protobuf.Empty} Empty instance + */ + Empty.create = function create(properties) { + return new Empty(properties); + }; + + /** + * Encodes the specified Empty message. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encode + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + return writer; + }; + + /** + * Encodes the specified Empty message, length delimited. Does not implicitly {@link google.protobuf.Empty.verify|verify} messages. + * @function encodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.IEmpty} message Empty message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Empty.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes an Empty message from the specified reader or buffer. + * @function decode + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.protobuf.Empty(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes an Empty message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.protobuf.Empty + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.protobuf.Empty} Empty + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Empty.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies an Empty message. + * @function verify + * @memberof google.protobuf.Empty + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Empty.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + return null; + }; + + /** + * Creates an Empty message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.protobuf.Empty + * @static + * @param {Object.} object Plain object + * @returns {google.protobuf.Empty} Empty + */ + Empty.fromObject = function fromObject(object) { + if (object instanceof $root.google.protobuf.Empty) + return object; + return new $root.google.protobuf.Empty(); + }; + + /** + * Creates a plain object from an Empty message. Also converts values to other types if specified. + * @function toObject + * @memberof google.protobuf.Empty + * @static + * @param {google.protobuf.Empty} message Empty + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + Empty.toObject = function toObject() { + return {}; + }; + + /** + * Converts this Empty to JSON. + * @function toJSON + * @memberof google.protobuf.Empty + * @instance + * @returns {Object.} JSON object + */ + Empty.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for Empty + * @function getTypeUrl + * @memberof google.protobuf.Empty + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + Empty.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.protobuf.Empty"; + }; + + return Empty; + })(); + + return protobuf; + })(); + + return google; + })(); + + return $root; +}); diff --git a/packages/google-marketingplatform-admin/protos/protos.json b/packages/google-marketingplatform-admin/protos/protos.json new file mode 100644 index 00000000000..e9dcf1a1e66 --- /dev/null +++ b/packages/google-marketingplatform-admin/protos/protos.json @@ -0,0 +1,2103 @@ +{ + "options": { + "syntax": "proto3" + }, + "nested": { + "google": { + "nested": { + "marketingplatform": { + "nested": { + "admin": { + "nested": { + "v1alpha": { + "options": { + "csharp_namespace": "Google.Ads.MarketingPlatform.Admin.V1Alpha", + "go_package": "google.golang.org/genproto/googleapis/marketingplatform/admin/v1alpha;admin", + "java_multiple_files": true, + "java_outer_classname": "ResourcesProto", + "java_package": "com.google.ads.marketingplatform.admin.v1alpha", + "php_namespace": "Google\\Ads\\MarketingPlatform\\Admin\\V1alpha", + "ruby_package": "Google::Ads::MarketingPlatform::Admin::V1alpha", + "(google.api.resource_definition).type": "analyticsadmin.googleapis.com/Account", + "(google.api.resource_definition).pattern": "accounts/{account}" + }, + "nested": { + "MarketingplatformAdminService": { + "options": { + "(google.api.default_host)": "marketingplatformadmin.googleapis.com", + "(google.api.oauth_scopes)": "https://www.googleapis.com/auth/marketingplatformadmin.analytics.read,https://www.googleapis.com/auth/marketingplatformadmin.analytics.update" + }, + "methods": { + "GetOrganization": { + "requestType": "GetOrganizationRequest", + "responseType": "Organization", + "options": { + "(google.api.http).get": "/v1alpha/{name=organizations/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{name=organizations/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "ListAnalyticsAccountLinks": { + "requestType": "ListAnalyticsAccountLinksRequest", + "responseType": "ListAnalyticsAccountLinksResponse", + "options": { + "(google.api.http).get": "/v1alpha/{parent=organizations/*}/analyticsAccountLinks", + "(google.api.method_signature)": "parent" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "get": "/v1alpha/{parent=organizations/*}/analyticsAccountLinks" + } + }, + { + "(google.api.method_signature)": "parent" + } + ] + }, + "CreateAnalyticsAccountLink": { + "requestType": "CreateAnalyticsAccountLinkRequest", + "responseType": "AnalyticsAccountLink", + "options": { + "(google.api.http).post": "/v1alpha/{parent=organizations/*}/analyticsAccountLinks", + "(google.api.http).body": "analytics_account_link", + "(google.api.method_signature)": "parent,analytics_account_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{parent=organizations/*}/analyticsAccountLinks", + "body": "analytics_account_link" + } + }, + { + "(google.api.method_signature)": "parent,analytics_account_link" + } + ] + }, + "DeleteAnalyticsAccountLink": { + "requestType": "DeleteAnalyticsAccountLinkRequest", + "responseType": "google.protobuf.Empty", + "options": { + "(google.api.http).delete": "/v1alpha/{name=organizations/*/analyticsAccountLinks/*}", + "(google.api.method_signature)": "name" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "delete": "/v1alpha/{name=organizations/*/analyticsAccountLinks/*}" + } + }, + { + "(google.api.method_signature)": "name" + } + ] + }, + "SetPropertyServiceLevel": { + "requestType": "SetPropertyServiceLevelRequest", + "responseType": "SetPropertyServiceLevelResponse", + "options": { + "(google.api.http).post": "/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel", + "(google.api.http).body": "*", + "(google.api.method_signature)": "analytics_account_link" + }, + "parsedOptions": [ + { + "(google.api.http)": { + "post": "/v1alpha/{analytics_account_link=organizations/*/analyticsAccountLinks/*}:setPropertyServiceLevel", + "body": "*" + } + }, + { + "(google.api.method_signature)": "analytics_account_link" + } + ] + } + } + }, + "AnalyticsServiceLevel": { + "values": { + "ANALYTICS_SERVICE_LEVEL_UNSPECIFIED": 0, + "ANALYTICS_SERVICE_LEVEL_STANDARD": 1, + "ANALYTICS_SERVICE_LEVEL_360": 2 + } + }, + "GetOrganizationRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "marketingplatformadmin.googleapis.com/Organization" + } + } + } + }, + "ListAnalyticsAccountLinksRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + } + }, + "pageSize": { + "type": "int32", + "id": 2, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + }, + "pageToken": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OPTIONAL" + } + } + } + }, + "ListAnalyticsAccountLinksResponse": { + "fields": { + "analyticsAccountLinks": { + "rule": "repeated", + "type": "AnalyticsAccountLink", + "id": 1 + }, + "nextPageToken": { + "type": "string", + "id": 2 + } + } + }, + "CreateAnalyticsAccountLinkRequest": { + "fields": { + "parent": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).child_type": "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + } + }, + "analyticsAccountLink": { + "type": "AnalyticsAccountLink", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "DeleteAnalyticsAccountLinkRequest": { + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "marketingplatformadmin.googleapis.com/AnalyticsAccountLink" + } + } + } + }, + "SetPropertyServiceLevelRequest": { + "fields": { + "analyticsAccountLink": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + }, + "analyticsProperty": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "REQUIRED", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Property" + } + }, + "serviceLevel": { + "type": "AnalyticsServiceLevel", + "id": 3, + "options": { + "(google.api.field_behavior)": "REQUIRED" + } + } + } + }, + "SetPropertyServiceLevelResponse": { + "fields": {} + }, + "LinkVerificationState": { + "values": { + "LINK_VERIFICATION_STATE_UNSPECIFIED": 0, + "LINK_VERIFICATION_STATE_VERIFIED": 1, + "LINK_VERIFICATION_STATE_NOT_VERIFIED": 2 + } + }, + "Organization": { + "options": { + "(google.api.resource).type": "marketingplatformadmin.googleapis.com/Organization", + "(google.api.resource).pattern": "organizations/{organization}", + "(google.api.resource).plural": "organizations", + "(google.api.resource).singular": "organization" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "displayName": { + "type": "string", + "id": 2 + } + } + }, + "AnalyticsAccountLink": { + "options": { + "(google.api.resource).type": "marketingplatformadmin.googleapis.com/AnalyticsAccountLink", + "(google.api.resource).pattern": "organizations/{organization}/analyticsAccountLinks/{analytics_account_link}", + "(google.api.resource).plural": "analyticsAccountLinks", + "(google.api.resource).singular": "analyticsAccountLink" + }, + "fields": { + "name": { + "type": "string", + "id": 1, + "options": { + "(google.api.field_behavior)": "IDENTIFIER" + } + }, + "analyticsAccount": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "IMMUTABLE", + "(google.api.resource_reference).type": "analyticsadmin.googleapis.com/Account" + } + }, + "displayName": { + "type": "string", + "id": 3, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "linkVerificationState": { + "type": "LinkVerificationState", + "id": 4, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + } + } + } + } + } + } + } + }, + "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" + }, + "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 + } + } + }, + "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" + }, + "FieldBehavior": { + "values": { + "FIELD_BEHAVIOR_UNSPECIFIED": 0, + "OPTIONAL": 1, + "REQUIRED": 2, + "OUTPUT_ONLY": 3, + "INPUT_ONLY": 4, + "IMMUTABLE": 5, + "UNORDERED_LIST": 6, + "NON_EMPTY_DEFAULT": 7, + "IDENTIFIER": 8 + } + }, + "resourceReference": { + "type": "google.api.ResourceReference", + "id": 1055, + "extend": "google.protobuf.FieldOptions" + }, + "resourceDefinition": { + "rule": "repeated", + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.FileOptions" + }, + "resource": { + "type": "google.api.ResourceDescriptor", + "id": 1053, + "extend": "google.protobuf.MessageOptions" + }, + "ResourceDescriptor": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "pattern": { + "rule": "repeated", + "type": "string", + "id": 2 + }, + "nameField": { + "type": "string", + "id": 3 + }, + "history": { + "type": "History", + "id": 4 + }, + "plural": { + "type": "string", + "id": 5 + }, + "singular": { + "type": "string", + "id": 6 + }, + "style": { + "rule": "repeated", + "type": "Style", + "id": 10 + } + }, + "nested": { + "History": { + "values": { + "HISTORY_UNSPECIFIED": 0, + "ORIGINALLY_SINGLE_PATTERN": 1, + "FUTURE_MULTI_PATTERN": 2 + } + }, + "Style": { + "values": { + "STYLE_UNSPECIFIED": 0, + "DECLARATIVE_FRIENDLY": 1 + } + } + } + }, + "ResourceReference": { + "fields": { + "type": { + "type": "string", + "id": 1 + }, + "childType": { + "type": "string", + "id": 2 + } + } + } + } + }, + "protobuf": { + "options": { + "go_package": "google.golang.org/protobuf/types/descriptorpb", + "java_package": "com.google.protobuf", + "java_outer_classname": "DescriptorProtos", + "csharp_namespace": "Google.Protobuf.Reflection", + "objc_class_prefix": "GPB", + "cc_enable_arenas": true, + "optimize_for": "SPEED" + }, + "nested": { + "FileDescriptorSet": { + "fields": { + "file": { + "rule": "repeated", + "type": "FileDescriptorProto", + "id": 1 + } + } + }, + "Edition": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "package": { + "type": "string", + "id": 2 + }, + "dependency": { + "rule": "repeated", + "type": "string", + "id": 3 + }, + "publicDependency": { + "rule": "repeated", + "type": "int32", + "id": 10, + "options": { + "packed": false + } + }, + "weakDependency": { + "rule": "repeated", + "type": "int32", + "id": 11, + "options": { + "packed": false + } + }, + "messageType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 4 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 5 + }, + "service": { + "rule": "repeated", + "type": "ServiceDescriptorProto", + "id": 6 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 7 + }, + "options": { + "type": "FileOptions", + "id": 8 + }, + "sourceCodeInfo": { + "type": "SourceCodeInfo", + "id": 9 + }, + "syntax": { + "type": "string", + "id": 12 + }, + "edition": { + "type": "Edition", + "id": 14 + } + } + }, + "DescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "field": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 2 + }, + "extension": { + "rule": "repeated", + "type": "FieldDescriptorProto", + "id": 6 + }, + "nestedType": { + "rule": "repeated", + "type": "DescriptorProto", + "id": 3 + }, + "enumType": { + "rule": "repeated", + "type": "EnumDescriptorProto", + "id": 4 + }, + "extensionRange": { + "rule": "repeated", + "type": "ExtensionRange", + "id": 5 + }, + "oneofDecl": { + "rule": "repeated", + "type": "OneofDescriptorProto", + "id": 8 + }, + "options": { + "type": "MessageOptions", + "id": 7 + }, + "reservedRange": { + "rule": "repeated", + "type": "ReservedRange", + "id": 9 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 10 + } + }, + "nested": { + "ExtensionRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "ExtensionRangeOptions", + "id": 3 + } + } + }, + "ReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "ExtensionRangeOptions": { + "fields": { + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + }, + "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": { + "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": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "options": { + "type": "OneofOptions", + "id": 2 + } + } + }, + "EnumDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "value": { + "rule": "repeated", + "type": "EnumValueDescriptorProto", + "id": 2 + }, + "options": { + "type": "EnumOptions", + "id": 3 + }, + "reservedRange": { + "rule": "repeated", + "type": "EnumReservedRange", + "id": 4 + }, + "reservedName": { + "rule": "repeated", + "type": "string", + "id": 5 + } + }, + "nested": { + "EnumReservedRange": { + "fields": { + "start": { + "type": "int32", + "id": 1 + }, + "end": { + "type": "int32", + "id": 2 + } + } + } + } + }, + "EnumValueDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "number": { + "type": "int32", + "id": 2 + }, + "options": { + "type": "EnumValueOptions", + "id": 3 + } + } + }, + "ServiceDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "method": { + "rule": "repeated", + "type": "MethodDescriptorProto", + "id": 2 + }, + "options": { + "type": "ServiceOptions", + "id": 3 + } + } + }, + "MethodDescriptorProto": { + "fields": { + "name": { + "type": "string", + "id": 1 + }, + "inputType": { + "type": "string", + "id": 2 + }, + "outputType": { + "type": "string", + "id": 3 + }, + "options": { + "type": "MethodOptions", + "id": 4 + }, + "clientStreaming": { + "type": "bool", + "id": 5, + "options": { + "default": false + } + }, + "serverStreaming": { + "type": "bool", + "id": 6, + "options": { + "default": false + } + } + } + }, + "FileOptions": { + "fields": { + "javaPackage": { + "type": "string", + "id": 1 + }, + "javaOuterClassname": { + "type": "string", + "id": 8 + }, + "javaMultipleFiles": { + "type": "bool", + "id": 10, + "options": { + "default": false + } + }, + "javaGenerateEqualsAndHash": { + "type": "bool", + "id": 20, + "options": { + "deprecated": true + } + }, + "javaStringCheckUtf8": { + "type": "bool", + "id": 27, + "options": { + "default": false + } + }, + "optimizeFor": { + "type": "OptimizeMode", + "id": 9, + "options": { + "default": "SPEED" + } + }, + "goPackage": { + "type": "string", + "id": 11 + }, + "ccGenericServices": { + "type": "bool", + "id": 16, + "options": { + "default": false + } + }, + "javaGenericServices": { + "type": "bool", + "id": 17, + "options": { + "default": false + } + }, + "pyGenericServices": { + "type": "bool", + "id": 18, + "options": { + "default": false + } + }, + "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": { + "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": { + "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, + "options": { + "packed": false + } + }, + "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": { + "fields": { + "features": { + "type": "FeatureSet", + "id": 1 + }, + "uninterpretedOption": { + "rule": "repeated", + "type": "UninterpretedOption", + "id": 999 + } + }, + "extensions": [ + [ + 1000, + 536870911 + ] + ] + }, + "EnumOptions": { + "fields": { + "allowAlias": { + "type": "bool", + "id": 2 + }, + "deprecated": { + "type": "bool", + "id": 3, + "options": { + "default": false + } + }, + "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": { + "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": { + "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": { + "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": { + "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": { + "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 + ], + [ + 9995, + 9999 + ] + ], + "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": { + "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": { + "fields": { + "location": { + "rule": "repeated", + "type": "Location", + "id": 1 + } + }, + "nested": { + "Location": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "span": { + "rule": "repeated", + "type": "int32", + "id": 2 + }, + "leadingComments": { + "type": "string", + "id": 3 + }, + "trailingComments": { + "type": "string", + "id": 4 + }, + "leadingDetachedComments": { + "rule": "repeated", + "type": "string", + "id": 6 + } + } + } + } + }, + "GeneratedCodeInfo": { + "fields": { + "annotation": { + "rule": "repeated", + "type": "Annotation", + "id": 1 + } + }, + "nested": { + "Annotation": { + "fields": { + "path": { + "rule": "repeated", + "type": "int32", + "id": 1 + }, + "sourceFile": { + "type": "string", + "id": 2 + }, + "begin": { + "type": "int32", + "id": 3 + }, + "end": { + "type": "int32", + "id": 4 + }, + "semantic": { + "type": "Semantic", + "id": 5 + } + }, + "nested": { + "Semantic": { + "values": { + "NONE": 0, + "SET": 1, + "ALIAS": 2 + } + } + } + } + } + }, + "Duration": { + "fields": { + "seconds": { + "type": "int64", + "id": 1 + }, + "nanos": { + "type": "int32", + "id": 2 + } + } + }, + "Empty": { + "fields": {} + } + } + } + } + } + } +} \ No newline at end of file diff --git a/packages/google-marketingplatform-admin/samples/README.md b/packages/google-marketingplatform-admin/samples/README.md new file mode 100644 index 00000000000..49199341760 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/README.md @@ -0,0 +1,140 @@ +[//]: # "This README.md file is auto-generated, all changes to this file will be lost." +[//]: # "To regenerate it, use `python -m synthtool`." +Google Cloud Platform logo + +# [Google Marketing Platform Admin API: Node.js Samples](https://github.com/googleapis/google-cloud-node) + +[![Open in Cloud Shell][shell_img]][shell_link] + + + +## Table of Contents + +* [Before you begin](#before-you-begin) +* [Samples](#samples) + * [Marketingplatform_admin_service.create_analytics_account_link](#marketingplatform_admin_service.create_analytics_account_link) + * [Marketingplatform_admin_service.delete_analytics_account_link](#marketingplatform_admin_service.delete_analytics_account_link) + * [Marketingplatform_admin_service.get_organization](#marketingplatform_admin_service.get_organization) + * [Marketingplatform_admin_service.list_analytics_account_links](#marketingplatform_admin_service.list_analytics_account_links) + * [Marketingplatform_admin_service.set_property_service_level](#marketingplatform_admin_service.set_property_service_level) + * [Quickstart](#quickstart) + +## Before you begin + +Before running the samples, make sure you've followed the steps outlined in +[Using the client library](https://github.com/googleapis/google-cloud-node#using-the-client-library). + +`cd samples` + +`npm install` + +`cd ..` + +## Samples + + + +### Marketingplatform_admin_service.create_analytics_account_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js` + + +----- + + + + +### Marketingplatform_admin_service.delete_analytics_account_link + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js,samples/README.md) + +__Usage:__ + + +`node packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js` + + +----- + + + + +### Marketingplatform_admin_service.get_organization + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js,samples/README.md) + +__Usage:__ + + +`node packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js` + + +----- + + + + +### Marketingplatform_admin_service.list_analytics_account_links + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js,samples/README.md) + +__Usage:__ + + +`node packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js` + + +----- + + + + +### Marketingplatform_admin_service.set_property_service_level + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js,samples/README.md) + +__Usage:__ + + +`node packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js` + + +----- + + + + +### Quickstart + +View the [source code](https://github.com/googleapis/google-cloud-node/blob/main/packages/google-marketingplatform-admin/samples/quickstart.js). + +[![Open in Cloud Shell][shell_img]](https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=packages/google-marketingplatform-admin/samples/quickstart.js,samples/README.md) + +__Usage:__ + + +`node packages/google-marketingplatform-admin/samples/quickstart.js` + + + + + + +[shell_img]: https://gstatic.com/cloudssh/images/open-btn.png +[shell_link]: https://console.cloud.google.com/cloudshell/open?git_repo=https://github.com/googleapis/google-cloud-node&page=editor&open_in_editor=samples/README.md +[product-docs]: https://developers.google.com/analytics/devguides/config/gmp/v1 diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js new file mode 100644 index 00000000000..b11bc85b5b1 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.create_analytics_account_link.js @@ -0,0 +1,67 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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, analyticsAccountLink) { + // [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAnalyticsAccountLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 Analytics account link will be + * created. Format: organizations/{org_id} + */ + // const parent = 'abc123' + /** + * Required. The Analytics account link to create. + */ + // const analyticsAccountLink = {} + + // Imports the Admin library + const {MarketingplatformAdminServiceClient} = require('@google-ads/marketing-platform-admin').v1alpha; + + // Instantiates a client + const adminClient = new MarketingplatformAdminServiceClient(); + + async function callCreateAnalyticsAccountLink() { + // Construct request + const request = { + parent, + analyticsAccountLink, + }; + + // Run request + const response = await adminClient.createAnalyticsAccountLink(request); + console.log(response); + } + + callCreateAnalyticsAccountLink(); + // [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAnalyticsAccountLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js new file mode 100644 index 00000000000..fb6fedb193b --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js @@ -0,0 +1,63 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteAnalyticsAccountLink_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + */ + // const name = 'abc123' + + // Imports the Admin library + const {MarketingplatformAdminServiceClient} = require('@google-ads/marketing-platform-admin').v1alpha; + + // Instantiates a client + const adminClient = new MarketingplatformAdminServiceClient(); + + async function callDeleteAnalyticsAccountLink() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.deleteAnalyticsAccountLink(request); + console.log(response); + } + + callDeleteAnalyticsAccountLink(); + // [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteAnalyticsAccountLink_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js new file mode 100644 index 00000000000..eda3040f905 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.get_organization.js @@ -0,0 +1,62 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetOrganization_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 Organization to retrieve. + * Format: organizations/{org_id} + */ + // const name = 'abc123' + + // Imports the Admin library + const {MarketingplatformAdminServiceClient} = require('@google-ads/marketing-platform-admin').v1alpha; + + // Instantiates a client + const adminClient = new MarketingplatformAdminServiceClient(); + + async function callGetOrganization() { + // Construct request + const request = { + name, + }; + + // Run request + const response = await adminClient.getOrganization(request); + console.log(response); + } + + callGetOrganization(); + // [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetOrganization_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js new file mode 100644 index 00000000000..f81fb0163a2 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.list_analytics_account_links.js @@ -0,0 +1,79 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAnalyticsAccountLinks_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {MarketingplatformAdminServiceClient} = require('@google-ads/marketing-platform-admin').v1alpha; + + // Instantiates a client + const adminClient = new MarketingplatformAdminServiceClient(); + + async function callListAnalyticsAccountLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listAnalyticsAccountLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAnalyticsAccountLinks(); + // [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAnalyticsAccountLinks_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js new file mode 100644 index 00000000000..8b2cc59c3f9 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/marketingplatform_admin_service.set_property_service_level.js @@ -0,0 +1,75 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + + + +'use strict'; + +function main(analyticsAccountLink, analyticsProperty, serviceLevel) { + // [START marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_SetPropertyServiceLevel_async] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + */ + // const analyticsAccountLink = 'abc123' + /** + * Required. The Analytics property to change the ServiceLevel setting. This + * field is the name of the Google Analytics Admin API property resource. + * Format: analyticsadmin.googleapis.com/properties/{property_id} + */ + // const analyticsProperty = 'abc123' + /** + * Required. The service level to set for this property. + */ + // const serviceLevel = {} + + // Imports the Admin library + const {MarketingplatformAdminServiceClient} = require('@google-ads/marketing-platform-admin').v1alpha; + + // Instantiates a client + const adminClient = new MarketingplatformAdminServiceClient(); + + async function callSetPropertyServiceLevel() { + // Construct request + const request = { + analyticsAccountLink, + analyticsProperty, + serviceLevel, + }; + + // Run request + const response = await adminClient.setPropertyServiceLevel(request); + console.log(response); + } + + callSetPropertyServiceLevel(); + // [END marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_SetPropertyServiceLevel_async] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json new file mode 100644 index 00000000000..c3d1f856eed --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json @@ -0,0 +1,235 @@ +{ + "clientLibrary": { + "name": "nodejs-admin", + "version": "0.0.0", + "language": "TYPESCRIPT", + "apis": [ + { + "id": "google.marketingplatform.admin.v1alpha", + "version": "v1alpha" + } + ] + }, + "snippets": [ + { + "regionTag": "marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetOrganization_async", + "title": "MarketingplatformAdminService getOrganization Sample", + "origin": "API_DEFINITION", + "description": " Lookup for a single organization.", + "canonical": true, + "file": "marketingplatform_admin_service.get_organization.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 54, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "GetOrganization", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.GetOrganization", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.marketingplatform.admin.v1alpha.Organization", + "client": { + "shortName": "MarketingplatformAdminServiceClient", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient" + }, + "method": { + "shortName": "GetOrganization", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.GetOrganization", + "service": { + "shortName": "MarketingplatformAdminService", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService" + } + } + } + }, + { + "regionTag": "marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAnalyticsAccountLinks_async", + "title": "MarketingplatformAdminService listAnalyticsAccountLinks Sample", + "origin": "API_DEFINITION", + "description": " Lists the Google Analytics accounts link to the specified Google Marketing Platform organization.", + "canonical": true, + "file": "marketingplatform_admin_service.list_analytics_account_links.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 71, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "ListAnalyticsAccountLinks", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.ListAnalyticsAccountLinks", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "page_size", + "type": "TYPE_INT32" + }, + { + "name": "page_token", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksResponse", + "client": { + "shortName": "MarketingplatformAdminServiceClient", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient" + }, + "method": { + "shortName": "ListAnalyticsAccountLinks", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.ListAnalyticsAccountLinks", + "service": { + "shortName": "MarketingplatformAdminService", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService" + } + } + } + }, + { + "regionTag": "marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAnalyticsAccountLink_async", + "title": "MarketingplatformAdminService createAnalyticsAccountLink Sample", + "origin": "API_DEFINITION", + "description": " Creates the link between the Analytics account and the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account to create the link. If the account is already linked to an organization, user needs to unlink the account from the current organization, then try link again.", + "canonical": true, + "file": "marketingplatform_admin_service.create_analytics_account_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 59, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "CreateAnalyticsAccountLink", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.CreateAnalyticsAccountLink", + "async": true, + "parameters": [ + { + "name": "parent", + "type": "TYPE_STRING" + }, + { + "name": "analytics_account_link", + "type": ".google.marketingplatform.admin.v1alpha.AnalyticsAccountLink" + } + ], + "resultType": ".google.marketingplatform.admin.v1alpha.AnalyticsAccountLink", + "client": { + "shortName": "MarketingplatformAdminServiceClient", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient" + }, + "method": { + "shortName": "CreateAnalyticsAccountLink", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.CreateAnalyticsAccountLink", + "service": { + "shortName": "MarketingplatformAdminService", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService" + } + } + } + }, + { + "regionTag": "marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteAnalyticsAccountLink_async", + "title": "MarketingplatformAdminService deleteAnalyticsAccountLink Sample", + "origin": "API_DEFINITION", + "description": " Deletes the AnalyticsAccountLink, which detaches the Analytics account from the Google Marketing Platform organization. User needs to be an org user, and admin on the Analytics account in order to delete the link.", + "canonical": true, + "file": "marketingplatform_admin_service.delete_analytics_account_link.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 55, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "DeleteAnalyticsAccountLink", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.DeleteAnalyticsAccountLink", + "async": true, + "parameters": [ + { + "name": "name", + "type": "TYPE_STRING" + } + ], + "resultType": ".google.protobuf.Empty", + "client": { + "shortName": "MarketingplatformAdminServiceClient", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient" + }, + "method": { + "shortName": "DeleteAnalyticsAccountLink", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.DeleteAnalyticsAccountLink", + "service": { + "shortName": "MarketingplatformAdminService", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService" + } + } + } + }, + { + "regionTag": "marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_SetPropertyServiceLevel_async", + "title": "MarketingplatformAdminService setPropertyServiceLevel Sample", + "origin": "API_DEFINITION", + "description": " Updates the service level for an Analytics property.", + "canonical": true, + "file": "marketingplatform_admin_service.set_property_service_level.js", + "language": "JAVASCRIPT", + "segments": [ + { + "start": 25, + "end": 67, + "type": "FULL" + } + ], + "clientMethod": { + "shortName": "SetPropertyServiceLevel", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.SetPropertyServiceLevel", + "async": true, + "parameters": [ + { + "name": "analytics_account_link", + "type": "TYPE_STRING" + }, + { + "name": "analytics_property", + "type": "TYPE_STRING" + }, + { + "name": "service_level", + "type": ".google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel" + } + ], + "resultType": ".google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse", + "client": { + "shortName": "MarketingplatformAdminServiceClient", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminServiceClient" + }, + "method": { + "shortName": "SetPropertyServiceLevel", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService.SetPropertyServiceLevel", + "service": { + "shortName": "MarketingplatformAdminService", + "fullName": "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService" + } + } + } + } + ] +} \ No newline at end of file diff --git a/packages/google-marketingplatform-admin/samples/package.json b/packages/google-marketingplatform-admin/samples/package.json new file mode 100644 index 00000000000..93d6ded2cd3 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/package.json @@ -0,0 +1,24 @@ +{ + "name": "marketingplatformadminapi-samples", + "private": true, + "license": "Apache-2.0", + "author": "Google LLC", + "engines": { + "node": ">=14.0.0" + }, + "files": [ + "*.js" + ], + "scripts": { + "test": "c8 mocha --timeout 600000 test/*.js", + "publish": "echo 'sample test; do not publish'" + }, + "dependencies": { + "@google-ads/marketing-platform-admin": "0.0.0" + }, + "devDependencies": { + "c8": "^9.0.0", + "chai": "^4.2.0", + "mocha": "^8.0.0" + } +} diff --git a/packages/google-marketingplatform-admin/samples/quickstart.js b/packages/google-marketingplatform-admin/samples/quickstart.js new file mode 100644 index 00000000000..06357de6152 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/quickstart.js @@ -0,0 +1,78 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically 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 marketingplatformadmin_quickstart] + /** + * This snippet has been automatically generated and should be regarded as a code template only. + * It will 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 organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + */ + // const parent = 'abc123' + /** + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + */ + // const pageSize = 1234 + /** + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` must match the call that provided the page + * token. + */ + // const pageToken = 'abc123' + + // Imports the Admin library + const {MarketingplatformAdminServiceClient} = + require('@google-ads/marketing-platform-admin').v1alpha; + + // Instantiates a client + const adminClient = new MarketingplatformAdminServiceClient({fallback: true}); + + async function callListAnalyticsAccountLinks() { + // Construct request + const request = { + parent, + }; + + // Run request + const iterable = adminClient.listAnalyticsAccountLinksAsync(request); + for await (const response of iterable) { + console.log(response); + } + } + + callListAnalyticsAccountLinks(); + // [END marketingplatformadmin_quickstart] +} + +process.on('unhandledRejection', err => { + console.error(err.message); + process.exitCode = 1; +}); +main(...process.argv.slice(2)); diff --git a/packages/google-marketingplatform-admin/samples/test/quickstart.js b/packages/google-marketingplatform-admin/samples/test/quickstart.js new file mode 100644 index 00000000000..624858f06f6 --- /dev/null +++ b/packages/google-marketingplatform-admin/samples/test/quickstart.js @@ -0,0 +1,44 @@ +// Copyright 2022 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +// Commenting out this test given that we can't use the admin organization (google) +// 'use strict'; + +// const assert = require('assert'); +// const path = require('path'); +// const cp = require('child_process'); +// const {describe, it, before} = require('mocha'); +// const {MarketingplatformAdminServiceClient} = +// require('@google-ads/marketing-platform-admin').v1alpha; +// const marketingplatformadminapiClient = +// new MarketingplatformAdminServiceClient(); + +// const execSync = cmd => cp.execSync(cmd, {encoding: 'utf-8'}); + +// const cwd = path.join(__dirname, '..'); + +// describe('Quickstart', () => { +// let projectId; + +// before(async () => { +// projectId = await marketingplatformadminapiClient.getProjectId(); +// }); + +// it('should run quickstart', async () => { +// const output = execSync('node ./quickstart.js organizations/google.com', { +// cwd, +// }); +// assert(output !== null); +// }); +// }); diff --git a/packages/google-marketingplatform-admin/src/index.ts b/packages/google-marketingplatform-admin/src/index.ts new file mode 100644 index 00000000000..a425b11477f --- /dev/null +++ b/packages/google-marketingplatform-admin/src/index.ts @@ -0,0 +1,29 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, 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'; + +const MarketingplatformAdminServiceClient = + v1alpha.MarketingplatformAdminServiceClient; +type MarketingplatformAdminServiceClient = + v1alpha.MarketingplatformAdminServiceClient; + +export {v1alpha, MarketingplatformAdminServiceClient}; +export default {v1alpha, MarketingplatformAdminServiceClient}; +import * as protos from '../protos/protos'; +export {protos}; diff --git a/packages/google-marketingplatform-admin/src/v1alpha/gapic_metadata.json b/packages/google-marketingplatform-admin/src/v1alpha/gapic_metadata.json new file mode 100644 index 00000000000..16620b929ae --- /dev/null +++ b/packages/google-marketingplatform-admin/src/v1alpha/gapic_metadata.json @@ -0,0 +1,77 @@ +{ + "schema": "1.0", + "comment": "This file maps proto services/RPCs to the corresponding library clients/methods", + "language": "typescript", + "protoPackage": "google.marketingplatform.admin.v1alpha", + "libraryPackage": "@google-ads/marketing-platform-admin", + "services": { + "MarketingplatformAdminService": { + "clients": { + "grpc": { + "libraryClient": "MarketingplatformAdminServiceClient", + "rpcs": { + "GetOrganization": { + "methods": [ + "getOrganization" + ] + }, + "CreateAnalyticsAccountLink": { + "methods": [ + "createAnalyticsAccountLink" + ] + }, + "DeleteAnalyticsAccountLink": { + "methods": [ + "deleteAnalyticsAccountLink" + ] + }, + "SetPropertyServiceLevel": { + "methods": [ + "setPropertyServiceLevel" + ] + }, + "ListAnalyticsAccountLinks": { + "methods": [ + "listAnalyticsAccountLinks", + "listAnalyticsAccountLinksStream", + "listAnalyticsAccountLinksAsync" + ] + } + } + }, + "grpc-fallback": { + "libraryClient": "MarketingplatformAdminServiceClient", + "rpcs": { + "GetOrganization": { + "methods": [ + "getOrganization" + ] + }, + "CreateAnalyticsAccountLink": { + "methods": [ + "createAnalyticsAccountLink" + ] + }, + "DeleteAnalyticsAccountLink": { + "methods": [ + "deleteAnalyticsAccountLink" + ] + }, + "SetPropertyServiceLevel": { + "methods": [ + "setPropertyServiceLevel" + ] + }, + "ListAnalyticsAccountLinks": { + "methods": [ + "listAnalyticsAccountLinks", + "listAnalyticsAccountLinksStream", + "listAnalyticsAccountLinksAsync" + ] + } + } + } + } + } + } +} diff --git a/packages/google-marketingplatform-admin/src/v1alpha/index.ts b/packages/google-marketingplatform-admin/src/v1alpha/index.ts new file mode 100644 index 00000000000..1925b705e88 --- /dev/null +++ b/packages/google-marketingplatform-admin/src/v1alpha/index.ts @@ -0,0 +1,19 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {MarketingplatformAdminServiceClient} from './marketingplatform_admin_service_client'; diff --git a/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts new file mode 100644 index 00000000000..8ba6c7b58a7 --- /dev/null +++ b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client.ts @@ -0,0 +1,1150 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* global window */ +import type * as gax from 'google-gax'; +import type { + Callback, + CallOptions, + Descriptors, + ClientOptions, + PaginationCallback, + GaxCall, +} from 'google-gax'; +import {Transform} from 'stream'; +import * as protos from '../../protos/protos'; +import jsonProtos = require('../../protos/protos.json'); + +/** + * Client JSON configuration object, loaded from + * `src/v1alpha/marketingplatform_admin_service_client_config.json`. + * This file defines retry strategy and timeouts for all API methods in this library. + */ +import * as gapicConfig from './marketingplatform_admin_service_client_config.json'; +const version = require('../../../package.json').version; + +/** + * Service Interface for the Google Marketing Platform Admin API. + * @class + * @memberof v1alpha + */ +export class MarketingplatformAdminServiceClient { + 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; + 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}; + marketingplatformAdminServiceStub?: Promise<{[name: string]: Function}>; + + /** + * Construct an instance of MarketingplatformAdminServiceClient. + * + * @param {object} [options] - The configuration object. + * The options accepted by the constructor are described in detail + * in [this document](https://github.com/googleapis/gax-nodejs/blob/main/client-libraries.md#creating-the-client-instance). + * The common options are: + * @param {object} [options.credentials] - Credentials object. + * @param {string} [options.credentials.client_email] + * @param {string} [options.credentials.private_key] + * @param {string} [options.email] - Account email address. Required when + * using a .pem or .p12 keyFilename. + * @param {string} [options.keyFilename] - Full path to the a .json, .pem, or + * .p12 key downloaded from the Google Developers Console. If you provide + * a path to a JSON file, the projectId option below is not necessary. + * NOTE: .pem and .p12 require you to specify options.email as well. + * @param {number} [options.port] - The port on which to connect to + * the remote host. + * @param {string} [options.projectId] - The project ID from the Google + * Developer's Console, e.g. 'grape-spaceship-123'. We will also check + * the environment variable GCLOUD_PROJECT for your project ID. If your + * app is running in an environment which supports + * {@link https://developers.google.com/identity/protocols/application-default-credentials Application Default Credentials}, + * your project ID will be detected automatically. + * @param {string} [options.apiEndpoint] - The domain name of the + * API remote host. + * @param {gax.ClientConfig} [options.clientConfig] - Client configuration override. + * Follows the structure of {@link gapicConfig}. + * @param {boolean} [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 MarketingplatformAdminServiceClient({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 MarketingplatformAdminServiceClient; + 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 = 'marketingplatformadmin.' + 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 = { + analyticsAccountLinkPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}/analyticsAccountLinks/{analytics_account_link}' + ), + organizationPathTemplate: new this._gaxModule.PathTemplate( + 'organizations/{organization}' + ), + 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 = { + listAnalyticsAccountLinks: new this._gaxModule.PageDescriptor( + 'pageToken', + 'nextPageToken', + 'analyticsAccountLinks' + ), + }; + + // Put together the default options sent with requests. + this._defaults = this._gaxGrpc.constructSettings( + 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService', + 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.marketingplatformAdminServiceStub) { + return this.marketingplatformAdminServiceStub; + } + + // Put together the "service stub" for + // google.marketingplatform.admin.v1alpha.MarketingplatformAdminService. + this.marketingplatformAdminServiceStub = this._gaxGrpc.createStub( + this._opts.fallback + ? (this._protos as protobuf.Root).lookupService( + 'google.marketingplatform.admin.v1alpha.MarketingplatformAdminService' + ) + : // eslint-disable-next-line @typescript-eslint/no-explicit-any + (this._protos as any).google.marketingplatform.admin.v1alpha + .MarketingplatformAdminService, + 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 marketingplatformAdminServiceStubMethods = [ + 'getOrganization', + 'listAnalyticsAccountLinks', + 'createAnalyticsAccountLink', + 'deleteAnalyticsAccountLink', + 'setPropertyServiceLevel', + ]; + for (const methodName of marketingplatformAdminServiceStubMethods) { + const callPromise = this.marketingplatformAdminServiceStub.then( + stub => + (...args: Array<{}>) => { + if (this._terminated) { + return Promise.reject('The client has already been closed.'); + } + const func = stub[methodName]; + return func.apply(stub, args); + }, + (err: Error | null | undefined) => () => { + throw err; + } + ); + + const descriptor = this.descriptors.page[methodName] || undefined; + const apiCall = this._gaxModule.createApiCall( + callPromise, + this._defaults[methodName], + descriptor, + this._opts.fallback + ); + + this.innerApiCalls[methodName] = apiCall; + } + + return this.marketingplatformAdminServiceStub; + } + + /** + * 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 'marketingplatformadmin.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 'marketingplatformadmin.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/marketingplatformadmin.analytics.read', + 'https://www.googleapis.com/auth/marketingplatformadmin.analytics.update', + ]; + } + + getProjectId(): Promise; + getProjectId(callback: Callback): void; + /** + * Return the project ID used by this class. + * @returns {Promise} A promise that resolves to string containing the project ID. + */ + getProjectId( + callback?: Callback + ): Promise | void { + if (callback) { + this.auth.getProjectId(callback); + return; + } + return this.auth.getProjectId(); + } + + // ------------------- + // -- Service calls -- + // ------------------- + /** + * Lookup for a single organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Organization to retrieve. + * Format: organizations/{org_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.marketingplatform.admin.v1alpha.Organization|Organization}. + * 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/marketingplatform_admin_service.get_organization.js + * region_tag:marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_GetOrganization_async + */ + getOrganization( + request?: protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, + options?: CallOptions + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.IOrganization, + ( + | protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest + | undefined + ), + {} | undefined, + ] + >; + getOrganization( + request: protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, + options: CallOptions, + callback: Callback< + protos.google.marketingplatform.admin.v1alpha.IOrganization, + | protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOrganization( + request: protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, + callback: Callback< + protos.google.marketingplatform.admin.v1alpha.IOrganization, + | protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest + | null + | undefined, + {} | null | undefined + > + ): void; + getOrganization( + request?: protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.marketingplatform.admin.v1alpha.IOrganization, + | protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.marketingplatform.admin.v1alpha.IOrganization, + | protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.IOrganization, + ( + | protos.google.marketingplatform.admin.v1alpha.IGetOrganizationRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.getOrganization(request, options, callback); + } + /** + * Creates the link between the Analytics account and the Google Marketing + * Platform organization. + * + * User needs to be an org user, and admin on the Analytics account to create + * the link. If the account is already linked to an organization, user needs + * to unlink the account from the current organization, then try link again. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent resource where this Analytics account link will be + * created. Format: organizations/{org_id} + * @param {google.marketingplatform.admin.v1alpha.AnalyticsAccountLink} request.analyticsAccountLink + * Required. The Analytics account link to create. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink|AnalyticsAccountLink}. + * 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/marketingplatform_admin_service.create_analytics_account_link.js + * region_tag:marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_CreateAnalyticsAccountLink_async + */ + createAnalyticsAccountLink( + request?: protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, + ( + | protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest + | undefined + ), + {} | undefined, + ] + >; + createAnalyticsAccountLink( + request: protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, + | protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createAnalyticsAccountLink( + request: protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, + callback: Callback< + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, + | protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + createAnalyticsAccountLink( + request?: protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, + | protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, + | protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink, + ( + | protos.google.marketingplatform.admin.v1alpha.ICreateAnalyticsAccountLinkRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.createAnalyticsAccountLink( + request, + options, + callback + ); + } + /** + * Deletes the AnalyticsAccountLink, which detaches the Analytics account from + * the Google Marketing Platform organization. + * + * User needs to be an org user, and admin on the Analytics account in order + * to delete the link. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.name + * Required. The name of the Analytics account link to delete. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.protobuf.Empty|Empty}. + * Please see the {@link https://github.com/googleapis/gax-nodejs/blob/master/client-libraries.md#regular-methods | documentation } + * for more details and examples. + * @example include:samples/generated/v1alpha/marketingplatform_admin_service.delete_analytics_account_link.js + * region_tag:marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_DeleteAnalyticsAccountLink_async + */ + deleteAnalyticsAccountLink( + request?: protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, + options?: CallOptions + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest + | undefined + ), + {} | undefined, + ] + >; + deleteAnalyticsAccountLink( + request: protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, + options: CallOptions, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAnalyticsAccountLink( + request: protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, + callback: Callback< + protos.google.protobuf.IEmpty, + | protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + > + ): void; + deleteAnalyticsAccountLink( + request?: protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.protobuf.IEmpty, + | protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.protobuf.IEmpty, + | protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.protobuf.IEmpty, + ( + | protos.google.marketingplatform.admin.v1alpha.IDeleteAnalyticsAccountLinkRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + name: request.name ?? '', + }); + this.initialize(); + return this.innerApiCalls.deleteAnalyticsAccountLink( + request, + options, + callback + ); + } + /** + * Updates the service level for an Analytics property. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.analyticsAccountLink + * Required. The parent AnalyticsAccountLink scope where this property is in. + * Format: + * organizations/{org_id}/analyticsAccountLinks/{analytics_account_link_id} + * @param {string} request.analyticsProperty + * Required. The Analytics property to change the ServiceLevel setting. This + * field is the name of the Google Analytics Admin API property resource. + * + * Format: analyticsadmin.googleapis.com/properties/{property_id} + * @param {google.marketingplatform.admin.v1alpha.AnalyticsServiceLevel} request.serviceLevel + * Required. The service level to set for this property. + * @param {object} [options] + * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. + * @returns {Promise} - The promise which resolves to an array. + * The first element of the array is an object representing {@link protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse|SetPropertyServiceLevelResponse}. + * 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/marketingplatform_admin_service.set_property_service_level.js + * region_tag:marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_SetPropertyServiceLevel_async + */ + setPropertyServiceLevel( + request?: protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, + options?: CallOptions + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, + ( + | protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest + | undefined + ), + {} | undefined, + ] + >; + setPropertyServiceLevel( + request: protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, + options: CallOptions, + callback: Callback< + protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, + | protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + setPropertyServiceLevel( + request: protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, + callback: Callback< + protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, + | protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest + | null + | undefined, + {} | null | undefined + > + ): void; + setPropertyServiceLevel( + request?: protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest, + optionsOrCallback?: + | CallOptions + | Callback< + protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, + | protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest + | null + | undefined, + {} | null | undefined + >, + callback?: Callback< + protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, + | protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest + | null + | undefined, + {} | null | undefined + > + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse, + ( + | protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelRequest + | undefined + ), + {} | undefined, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + analytics_account_link: request.analyticsAccountLink ?? '', + }); + this.initialize(); + return this.innerApiCalls.setPropertyServiceLevel( + request, + options, + callback + ); + } + + /** + * Lists the Google Analytics accounts link to the specified Google Marketing + * Platform organization. + * + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * @param {number} [request.pageSize] + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` 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.marketingplatform.admin.v1alpha.AnalyticsAccountLink|AnalyticsAccountLink}. + * 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 `listAnalyticsAccountLinksAsync()` + * 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. + */ + listAnalyticsAccountLinks( + request?: protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + options?: CallOptions + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[], + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest | null, + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse, + ] + >; + listAnalyticsAccountLinks( + request: protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + options: CallOptions, + callback: PaginationCallback< + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + | protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse + | null + | undefined, + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink + > + ): void; + listAnalyticsAccountLinks( + request: protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + callback: PaginationCallback< + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + | protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse + | null + | undefined, + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink + > + ): void; + listAnalyticsAccountLinks( + request?: protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + optionsOrCallback?: + | CallOptions + | PaginationCallback< + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + | protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse + | null + | undefined, + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink + >, + callback?: PaginationCallback< + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + | protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse + | null + | undefined, + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink + > + ): Promise< + [ + protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[], + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest | null, + protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksResponse, + ] + > | void { + request = request || {}; + let options: CallOptions; + if (typeof optionsOrCallback === 'function' && callback === undefined) { + callback = optionsOrCallback; + options = {}; + } else { + options = optionsOrCallback as CallOptions; + } + options = options || {}; + options.otherArgs = options.otherArgs || {}; + options.otherArgs.headers = options.otherArgs.headers || {}; + options.otherArgs.headers['x-goog-request-params'] = + this._gaxModule.routingHeader.fromParams({ + parent: request.parent ?? '', + }); + this.initialize(); + return this.innerApiCalls.listAnalyticsAccountLinks( + request, + options, + callback + ); + } + + /** + * Equivalent to `method.name.toCamelCase()`, but returns a NodeJS Stream object. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * @param {number} [request.pageSize] + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` 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.marketingplatform.admin.v1alpha.AnalyticsAccountLink|AnalyticsAccountLink} 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 `listAnalyticsAccountLinksAsync()` + * 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. + */ + listAnalyticsAccountLinksStream( + request?: protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + 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['listAnalyticsAccountLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalyticsAccountLinks.createStream( + this.innerApiCalls.listAnalyticsAccountLinks as GaxCall, + request, + callSettings + ); + } + + /** + * Equivalent to `listAnalyticsAccountLinks`, but returns an iterable object. + * + * `for`-`await`-`of` syntax is used with the iterable to get response elements on-demand. + * @param {Object} request + * The request object that will be sent. + * @param {string} request.parent + * Required. The parent organization, which owns this collection of Analytics + * account links. Format: organizations/{org_id} + * @param {number} [request.pageSize] + * Optional. The maximum number of Analytics account links to return in one + * call. The service may return fewer than this value. + * + * If unspecified, at most 50 Analytics account links will be returned. The + * maximum value is 1000; values above 1000 will be coerced to 1000. + * @param {string} [request.pageToken] + * Optional. A page token, received from a previous ListAnalyticsAccountLinks + * call. Provide this to retrieve the subsequent page. + * + * When paginating, all other parameters provided to + * `ListAnalyticsAccountLinks` 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.marketingplatform.admin.v1alpha.AnalyticsAccountLink|AnalyticsAccountLink}. 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/marketingplatform_admin_service.list_analytics_account_links.js + * region_tag:marketingplatformadmin_v1alpha_generated_MarketingplatformAdminService_ListAnalyticsAccountLinks_async + */ + listAnalyticsAccountLinksAsync( + request?: protos.google.marketingplatform.admin.v1alpha.IListAnalyticsAccountLinksRequest, + 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['listAnalyticsAccountLinks']; + const callSettings = defaultCallSettings.merge(options); + this.initialize(); + return this.descriptors.page.listAnalyticsAccountLinks.asyncIterate( + this.innerApiCalls['listAnalyticsAccountLinks'] as GaxCall, + request as {}, + callSettings + ) as AsyncIterable; + } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified analyticsAccountLink resource name string. + * + * @param {string} organization + * @param {string} analytics_account_link + * @returns {string} Resource name string. + */ + analyticsAccountLinkPath(organization: string, analyticsAccountLink: string) { + return this.pathTemplates.analyticsAccountLinkPathTemplate.render({ + organization: organization, + analytics_account_link: analyticsAccountLink, + }); + } + + /** + * Parse the organization from AnalyticsAccountLink resource. + * + * @param {string} analyticsAccountLinkName + * A fully-qualified path representing AnalyticsAccountLink resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromAnalyticsAccountLinkName( + analyticsAccountLinkName: string + ) { + return this.pathTemplates.analyticsAccountLinkPathTemplate.match( + analyticsAccountLinkName + ).organization; + } + + /** + * Parse the analytics_account_link from AnalyticsAccountLink resource. + * + * @param {string} analyticsAccountLinkName + * A fully-qualified path representing AnalyticsAccountLink resource. + * @returns {string} A string representing the analytics_account_link. + */ + matchAnalyticsAccountLinkFromAnalyticsAccountLinkName( + analyticsAccountLinkName: string + ) { + return this.pathTemplates.analyticsAccountLinkPathTemplate.match( + analyticsAccountLinkName + ).analytics_account_link; + } + + /** + * Return a fully-qualified organization resource name string. + * + * @param {string} organization + * @returns {string} Resource name string. + */ + organizationPath(organization: string) { + return this.pathTemplates.organizationPathTemplate.render({ + organization: organization, + }); + } + + /** + * Parse the organization from Organization resource. + * + * @param {string} organizationName + * A fully-qualified path representing Organization resource. + * @returns {string} A string representing the organization. + */ + matchOrganizationFromOrganizationName(organizationName: string) { + return this.pathTemplates.organizationPathTemplate.match(organizationName) + .organization; + } + + /** + * 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.marketingplatformAdminServiceStub && !this._terminated) { + return this.marketingplatformAdminServiceStub.then(stub => { + this._terminated = true; + stub.close(); + }); + } + return Promise.resolve(); + } +} diff --git a/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client_config.json b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client_config.json new file mode 100644 index 00000000000..8cff8499120 --- /dev/null +++ b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_client_config.json @@ -0,0 +1,64 @@ +{ + "interfaces": { + "google.marketingplatform.admin.v1alpha.MarketingplatformAdminService": { + "retry_codes": { + "non_idempotent": [], + "idempotent": [ + "DEADLINE_EXCEEDED", + "UNAVAILABLE" + ], + "unknown_unavailable": [ + "UNKNOWN", + "UNAVAILABLE" + ] + }, + "retry_params": { + "default": { + "initial_retry_delay_millis": 100, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + }, + "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c": { + "initial_retry_delay_millis": 1000, + "retry_delay_multiplier": 1.3, + "max_retry_delay_millis": 60000, + "initial_rpc_timeout_millis": 60000, + "rpc_timeout_multiplier": 1, + "max_rpc_timeout_millis": 60000, + "total_timeout_millis": 600000 + } + }, + "methods": { + "GetOrganization": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "ListAnalyticsAccountLinks": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "CreateAnalyticsAccountLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "DeleteAnalyticsAccountLink": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + }, + "SetPropertyServiceLevel": { + "timeout_millis": 60000, + "retry_codes_name": "unknown_unavailable", + "retry_params_name": "01d6d956b4dadd7e38ee9dec12ed8720e6e6f90c" + } + } + } + } +} diff --git a/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_proto_list.json b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_proto_list.json new file mode 100644 index 00000000000..977b7846a71 --- /dev/null +++ b/packages/google-marketingplatform-admin/src/v1alpha/marketingplatform_admin_service_proto_list.json @@ -0,0 +1,4 @@ +[ + "../../protos/google/marketingplatform/admin/v1alpha/marketingplatform_admin.proto", + "../../protos/google/marketingplatform/admin/v1alpha/resources.proto" +] diff --git a/packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.js b/packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.js new file mode 100644 index 00000000000..11f44a45d08 --- /dev/null +++ b/packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.js @@ -0,0 +1,27 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +/* eslint-disable node/no-missing-require, no-unused-vars */ +const admin = require('@google-ads/marketing-platform-admin'); + +function main() { + const marketingplatformAdminServiceClient = + new admin.MarketingplatformAdminServiceClient(); +} + +main(); diff --git a/packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.ts b/packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.ts new file mode 100644 index 00000000000..b5b24cbccde --- /dev/null +++ b/packages/google-marketingplatform-admin/system-test/fixtures/sample/src/index.ts @@ -0,0 +1,37 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 {MarketingplatformAdminServiceClient} from '@google-ads/marketing-platform-admin'; + +// check that the client class type name can be used +function doStuffWithMarketingplatformAdminServiceClient( + client: MarketingplatformAdminServiceClient +) { + client.close(); +} + +function main() { + // check that the client instance can be created + const marketingplatformAdminServiceClient = + new MarketingplatformAdminServiceClient(); + doStuffWithMarketingplatformAdminServiceClient( + marketingplatformAdminServiceClient + ); +} + +main(); diff --git a/packages/google-marketingplatform-admin/system-test/install.ts b/packages/google-marketingplatform-admin/system-test/install.ts new file mode 100644 index 00000000000..83b83f332c3 --- /dev/null +++ b/packages/google-marketingplatform-admin/system-test/install.ts @@ -0,0 +1,51 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** This file is automatically generated by gapic-generator-typescript. ** +// ** https://github.com/googleapis/gapic-generator-typescript ** +// ** All changes to this file may be overwritten. ** + +import {packNTest} from 'pack-n-play'; +import {readFileSync} from 'fs'; +import {describe, it} from 'mocha'; + +describe('📦 pack-n-play test', () => { + it('TypeScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'TypeScript user can use the type definitions', + ts: readFileSync( + './system-test/fixtures/sample/src/index.ts' + ).toString(), + }, + }; + await packNTest(options); + }); + + it('JavaScript code', async function () { + this.timeout(300000); + const options = { + packageDir: process.cwd(), + sample: { + description: 'JavaScript user can use the library', + ts: readFileSync( + './system-test/fixtures/sample/src/index.js' + ).toString(), + }, + }; + await packNTest(options); + }); +}); diff --git a/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts b/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts new file mode 100644 index 00000000000..87cde244abf --- /dev/null +++ b/packages/google-marketingplatform-admin/test/gapic_marketingplatform_admin_service_v1alpha.ts @@ -0,0 +1,1465 @@ +// Copyright 2024 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +// +// ** 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 marketingplatformadminserviceModule from '../src'; + +import {PassThrough} from 'stream'; + +import {protobuf} from 'google-gax'; + +// Dynamically loaded proto JSON is needed to get the type information +// to fill in default values for request objects +const root = protobuf.Root.fromJSON( + require('../protos/protos.json') +).resolveAll(); + +// eslint-disable-next-line @typescript-eslint/no-unused-vars +function getTypeDefaultValue(typeName: string, fields: string[]) { + let type = root.lookupType(typeName) as protobuf.Type; + for (const field of fields.slice(0, -1)) { + type = type.fields[field]?.resolvedType as protobuf.Type; + } + return type.fields[fields[fields.length - 1]]?.defaultValue; +} + +function generateSampleMessage(instance: T) { + const filledObject = ( + instance.constructor as typeof protobuf.Message + ).toObject(instance as protobuf.Message, {defaults: true}); + return (instance.constructor as typeof protobuf.Message).fromObject( + filledObject + ) as T; +} + +function stubSimpleCall(response?: ResponseType, error?: Error) { + return error + ? sinon.stub().rejects(error) + : sinon.stub().resolves([response]); +} + +function stubSimpleCallWithCallback( + response?: ResponseType, + error?: Error +) { + return error + ? sinon.stub().callsArgWith(2, error) + : sinon.stub().callsArgWith(2, null, response); +} + +function stubPageStreamingCall( + responses?: ResponseType[], + error?: Error +) { + const pagingStub = sinon.stub(); + if (responses) { + for (let i = 0; i < responses.length; ++i) { + pagingStub.onCall(i).callsArgWith(2, null, responses[i]); + } + } + const transformStub = error + ? sinon.stub().callsArgWith(2, error) + : pagingStub; + const mockStream = new PassThrough({ + objectMode: true, + transform: transformStub, + }); + // trigger as many responses as needed + if (responses) { + for (let i = 0; i < responses.length; ++i) { + setImmediate(() => { + mockStream.write({}); + }); + } + setImmediate(() => { + mockStream.end(); + }); + } else { + setImmediate(() => { + mockStream.write({}); + }); + setImmediate(() => { + mockStream.end(); + }); + } + return sinon.stub().returns(mockStream); +} + +function stubAsyncIterationCall( + responses?: ResponseType[], + error?: Error +) { + let counter = 0; + const asyncIterable = { + [Symbol.asyncIterator]() { + return { + async next() { + if (error) { + return Promise.reject(error); + } + if (counter >= responses!.length) { + return Promise.resolve({done: true, value: undefined}); + } + return Promise.resolve({done: false, value: responses![counter++]}); + }, + }; + }, + }; + return sinon.stub().returns(asyncIterable); +} + +describe('v1alpha.MarketingplatformAdminServiceClient', () => { + describe('Common methods', () => { + it('has apiEndpoint', () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient(); + const apiEndpoint = client.apiEndpoint; + assert.strictEqual(apiEndpoint, 'marketingplatformadmin.googleapis.com'); + }); + + it('has universeDomain', () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient(); + 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 = + marketingplatformadminserviceModule.v1alpha + .MarketingplatformAdminServiceClient.servicePath; + assert.strictEqual( + servicePath, + 'marketingplatformadmin.googleapis.com' + ); + assert(stub.called); + stub.restore(); + }); + + it('throws DeprecationWarning if static apiEndpoint is used', () => { + const stub = sinon.stub(process, 'emitWarning'); + const apiEndpoint = + marketingplatformadminserviceModule.v1alpha + .MarketingplatformAdminServiceClient.apiEndpoint; + assert.strictEqual( + apiEndpoint, + 'marketingplatformadmin.googleapis.com' + ); + assert(stub.called); + stub.restore(); + }); + } + it('sets apiEndpoint according to universe domain camelCase', () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + {universeDomain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'marketingplatformadmin.example.com'); + }); + + it('sets apiEndpoint according to universe domain snakeCase', () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + {universe_domain: 'example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'marketingplatformadmin.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 marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient(); + const servicePath = client.apiEndpoint; + assert.strictEqual(servicePath, 'marketingplatformadmin.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 marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + {universeDomain: 'configured.example.com'} + ); + const servicePath = client.apiEndpoint; + assert.strictEqual( + servicePath, + 'marketingplatformadmin.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 marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + {universe_domain: 'example.com', universeDomain: 'example.net'} + ); + }); + }); + + it('has port', () => { + const port = + marketingplatformadminserviceModule.v1alpha + .MarketingplatformAdminServiceClient.port; + assert(port); + assert(typeof port === 'number'); + }); + + it('should create a client with no option', () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient(); + assert(client); + }); + + it('should create a client with gRPC fallback', () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + fallback: true, + } + ); + assert(client); + }); + + it('has initialize method and supports deferred initialization', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.marketingplatformAdminServiceStub, undefined); + await client.initialize(); + assert(client.marketingplatformAdminServiceStub); + }); + + it('has close method for the initialized client', done => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + assert(client.marketingplatformAdminServiceStub); + client.close().then(() => { + done(); + }); + }); + + it('has close method for the non-initialized client', done => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + assert.strictEqual(client.marketingplatformAdminServiceStub, undefined); + client.close().then(() => { + done(); + }); + }); + + it('has getProjectId method', async () => { + const fakeProjectId = 'fake-project-id'; + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + 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 marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + 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('getOrganization', () => { + it('invokes getOrganization without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.GetOrganizationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.Organization() + ); + client.innerApiCalls.getOrganization = stubSimpleCall(expectedResponse); + const [response] = await client.getOrganization(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getOrganization as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOrganization as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOrganization without error using callback', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.GetOrganizationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.Organization() + ); + client.innerApiCalls.getOrganization = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.getOrganization( + request, + ( + err?: Error | null, + result?: protos.google.marketingplatform.admin.v1alpha.IOrganization | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.getOrganization as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOrganization as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOrganization with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.GetOrganizationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.getOrganization = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects(client.getOrganization(request), expectedError); + const actualRequest = ( + client.innerApiCalls.getOrganization as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.getOrganization as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes getOrganization with closed client', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.GetOrganizationRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.GetOrganizationRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects(client.getOrganization(request), expectedError); + }); + }); + + describe('createAnalyticsAccountLink', () => { + it('invokes createAnalyticsAccountLink without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ); + client.innerApiCalls.createAnalyticsAccountLink = + stubSimpleCall(expectedResponse); + const [response] = await client.createAnalyticsAccountLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAnalyticsAccountLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalyticsAccountLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalyticsAccountLink without error using callback', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ); + client.innerApiCalls.createAnalyticsAccountLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.createAnalyticsAccountLink( + request, + ( + err?: Error | null, + result?: protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.createAnalyticsAccountLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalyticsAccountLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalyticsAccountLink with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.createAnalyticsAccountLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.createAnalyticsAccountLink(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.createAnalyticsAccountLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.createAnalyticsAccountLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes createAnalyticsAccountLink with closed client', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.CreateAnalyticsAccountLinkRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.createAnalyticsAccountLink(request), + expectedError + ); + }); + }); + + describe('deleteAnalyticsAccountLink', () => { + it('invokes deleteAnalyticsAccountLink without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAnalyticsAccountLink = + stubSimpleCall(expectedResponse); + const [response] = await client.deleteAnalyticsAccountLink(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAnalyticsAccountLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAnalyticsAccountLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAnalyticsAccountLink without error using callback', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.protobuf.Empty() + ); + client.innerApiCalls.deleteAnalyticsAccountLink = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.deleteAnalyticsAccountLink( + request, + ( + err?: Error | null, + result?: protos.google.protobuf.IEmpty | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.deleteAnalyticsAccountLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAnalyticsAccountLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAnalyticsAccountLink with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedHeaderRequestParams = `name=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.deleteAnalyticsAccountLink = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.deleteAnalyticsAccountLink(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.deleteAnalyticsAccountLink as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.deleteAnalyticsAccountLink as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes deleteAnalyticsAccountLink with closed client', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.DeleteAnalyticsAccountLinkRequest', + ['name'] + ); + request.name = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.deleteAnalyticsAccountLink(request), + expectedError + ); + }); + }); + + describe('setPropertyServiceLevel', () => { + it('invokes setPropertyServiceLevel without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest', + ['analyticsAccountLink'] + ); + request.analyticsAccountLink = defaultValue1; + const expectedHeaderRequestParams = `analytics_account_link=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse() + ); + client.innerApiCalls.setPropertyServiceLevel = + stubSimpleCall(expectedResponse); + const [response] = await client.setPropertyServiceLevel(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setPropertyServiceLevel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setPropertyServiceLevel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setPropertyServiceLevel without error using callback', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest', + ['analyticsAccountLink'] + ); + request.analyticsAccountLink = defaultValue1; + const expectedHeaderRequestParams = `analytics_account_link=${defaultValue1}`; + const expectedResponse = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelResponse() + ); + client.innerApiCalls.setPropertyServiceLevel = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.setPropertyServiceLevel( + request, + ( + err?: Error | null, + result?: protos.google.marketingplatform.admin.v1alpha.ISetPropertyServiceLevelResponse | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.setPropertyServiceLevel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setPropertyServiceLevel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setPropertyServiceLevel with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest', + ['analyticsAccountLink'] + ); + request.analyticsAccountLink = defaultValue1; + const expectedHeaderRequestParams = `analytics_account_link=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.setPropertyServiceLevel = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.setPropertyServiceLevel(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.setPropertyServiceLevel as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.setPropertyServiceLevel as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes setPropertyServiceLevel with closed client', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.SetPropertyServiceLevelRequest', + ['analyticsAccountLink'] + ); + request.analyticsAccountLink = defaultValue1; + const expectedError = new Error('The client has already been closed.'); + client.close(); + await assert.rejects( + client.setPropertyServiceLevel(request), + expectedError + ); + }); + }); + + describe('listAnalyticsAccountLinks', () => { + it('invokes listAnalyticsAccountLinks without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + ]; + client.innerApiCalls.listAnalyticsAccountLinks = + stubSimpleCall(expectedResponse); + const [response] = await client.listAnalyticsAccountLinks(request); + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalyticsAccountLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyticsAccountLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyticsAccountLinks without error using callback', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + ]; + client.innerApiCalls.listAnalyticsAccountLinks = + stubSimpleCallWithCallback(expectedResponse); + const promise = new Promise((resolve, reject) => { + client.listAnalyticsAccountLinks( + request, + ( + err?: Error | null, + result?: + | protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[] + | null + ) => { + if (err) { + reject(err); + } else { + resolve(result); + } + } + ); + }); + const response = await promise; + assert.deepStrictEqual(response, expectedResponse); + const actualRequest = ( + client.innerApiCalls.listAnalyticsAccountLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyticsAccountLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyticsAccountLinks with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.innerApiCalls.listAnalyticsAccountLinks = stubSimpleCall( + undefined, + expectedError + ); + await assert.rejects( + client.listAnalyticsAccountLinks(request), + expectedError + ); + const actualRequest = ( + client.innerApiCalls.listAnalyticsAccountLinks as SinonStub + ).getCall(0).args[0]; + assert.deepStrictEqual(actualRequest, request); + const actualHeaderRequestParams = ( + client.innerApiCalls.listAnalyticsAccountLinks as SinonStub + ).getCall(0).args[1].otherArgs.headers['x-goog-request-params']; + assert(actualHeaderRequestParams.includes(expectedHeaderRequestParams)); + }); + + it('invokes listAnalyticsAccountLinksStream without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + ]; + client.descriptors.page.listAnalyticsAccountLinks.createStream = + stubPageStreamingCall(expectedResponse); + const stream = client.listAnalyticsAccountLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink[] = + []; + stream.on( + 'data', + ( + response: protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + ) => { + 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.listAnalyticsAccountLinks + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalyticsAccountLinks, request) + ); + assert( + ( + client.descriptors.page.listAnalyticsAccountLinks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('invokes listAnalyticsAccountLinksStream with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalyticsAccountLinks.createStream = + stubPageStreamingCall(undefined, expectedError); + const stream = client.listAnalyticsAccountLinksStream(request); + const promise = new Promise((resolve, reject) => { + const responses: protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink[] = + []; + stream.on( + 'data', + ( + response: protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink + ) => { + responses.push(response); + } + ); + stream.on('end', () => { + resolve(responses); + }); + stream.on('error', (err: Error) => { + reject(err); + }); + }); + await assert.rejects(promise, expectedError); + assert( + ( + client.descriptors.page.listAnalyticsAccountLinks + .createStream as SinonStub + ) + .getCall(0) + .calledWith(client.innerApiCalls.listAnalyticsAccountLinks, request) + ); + assert( + ( + client.descriptors.page.listAnalyticsAccountLinks + .createStream as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAnalyticsAccountLinks without error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedResponse = [ + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.AnalyticsAccountLink() + ), + ]; + client.descriptors.page.listAnalyticsAccountLinks.asyncIterate = + stubAsyncIterationCall(expectedResponse); + const responses: protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[] = + []; + const iterable = client.listAnalyticsAccountLinksAsync(request); + for await (const resource of iterable) { + responses.push(resource!); + } + assert.deepStrictEqual(responses, expectedResponse); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalyticsAccountLinks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listAnalyticsAccountLinks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + + it('uses async iteration with listAnalyticsAccountLinks with error', async () => { + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + const request = generateSampleMessage( + new protos.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest() + ); + const defaultValue1 = getTypeDefaultValue( + '.google.marketingplatform.admin.v1alpha.ListAnalyticsAccountLinksRequest', + ['parent'] + ); + request.parent = defaultValue1; + const expectedHeaderRequestParams = `parent=${defaultValue1}`; + const expectedError = new Error('expected'); + client.descriptors.page.listAnalyticsAccountLinks.asyncIterate = + stubAsyncIterationCall(undefined, expectedError); + const iterable = client.listAnalyticsAccountLinksAsync(request); + await assert.rejects(async () => { + const responses: protos.google.marketingplatform.admin.v1alpha.IAnalyticsAccountLink[] = + []; + for await (const resource of iterable) { + responses.push(resource!); + } + }); + assert.deepStrictEqual( + ( + client.descriptors.page.listAnalyticsAccountLinks + .asyncIterate as SinonStub + ).getCall(0).args[1], + request + ); + assert( + ( + client.descriptors.page.listAnalyticsAccountLinks + .asyncIterate as SinonStub + ) + .getCall(0) + .args[2].otherArgs.headers['x-goog-request-params'].includes( + expectedHeaderRequestParams + ) + ); + }); + }); + + describe('Path templates', () => { + describe('analyticsAccountLink', () => { + const fakePath = '/rendered/path/analyticsAccountLink'; + const expectedParameters = { + organization: 'organizationValue', + analytics_account_link: 'analyticsAccountLinkValue', + }; + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.analyticsAccountLinkPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.analyticsAccountLinkPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('analyticsAccountLinkPath', () => { + const result = client.analyticsAccountLinkPath( + 'organizationValue', + 'analyticsAccountLinkValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.analyticsAccountLinkPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromAnalyticsAccountLinkName', () => { + const result = + client.matchOrganizationFromAnalyticsAccountLinkName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + ( + client.pathTemplates.analyticsAccountLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchAnalyticsAccountLinkFromAnalyticsAccountLinkName', () => { + const result = + client.matchAnalyticsAccountLinkFromAnalyticsAccountLinkName( + fakePath + ); + assert.strictEqual(result, 'analyticsAccountLinkValue'); + assert( + ( + client.pathTemplates.analyticsAccountLinkPathTemplate + .match as SinonStub + ) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('organization', () => { + const fakePath = '/rendered/path/organization'; + const expectedParameters = { + organization: 'organizationValue', + }; + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.organizationPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.organizationPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('organizationPath', () => { + const result = client.organizationPath('organizationValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.organizationPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchOrganizationFromOrganizationName', () => { + const result = client.matchOrganizationFromOrganizationName(fakePath); + assert.strictEqual(result, 'organizationValue'); + assert( + (client.pathTemplates.organizationPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('property', () => { + const fakePath = '/rendered/path/property'; + const expectedParameters = { + property: 'propertyValue', + }; + const client = + new marketingplatformadminserviceModule.v1alpha.MarketingplatformAdminServiceClient( + { + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + } + ); + client.initialize(); + client.pathTemplates.propertyPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.propertyPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('propertyPath', () => { + const result = client.propertyPath('propertyValue'); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.propertyPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchPropertyFromPropertyName', () => { + const result = client.matchPropertyFromPropertyName(fakePath); + assert.strictEqual(result, 'propertyValue'); + assert( + (client.pathTemplates.propertyPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); +}); diff --git a/packages/google-marketingplatform-admin/tsconfig.json b/packages/google-marketingplatform-admin/tsconfig.json new file mode 100644 index 00000000000..c78f1c884ef --- /dev/null +++ b/packages/google-marketingplatform-admin/tsconfig.json @@ -0,0 +1,19 @@ +{ + "extends": "./node_modules/gts/tsconfig-google.json", + "compilerOptions": { + "rootDir": ".", + "outDir": "build", + "resolveJsonModule": true, + "lib": [ + "es2018", + "dom" + ] + }, + "include": [ + "src/*.ts", + "src/**/*.ts", + "test/*.ts", + "test/**/*.ts", + "system-test/*.ts" + ] +} diff --git a/packages/google-marketingplatform-admin/webpack.config.js b/packages/google-marketingplatform-admin/webpack.config.js new file mode 100644 index 00000000000..fcacb19796e --- /dev/null +++ b/packages/google-marketingplatform-admin/webpack.config.js @@ -0,0 +1,64 @@ +// Copyright 2021 Google LLC +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// https://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. + +const path = require('path'); + +module.exports = { + entry: './src/index.ts', + output: { + library: 'MarketingplatformAdminService', + filename: './marketingplatform-admin-service.js', + }, + node: { + child_process: 'empty', + fs: 'empty', + crypto: 'empty', + }, + resolve: { + alias: { + '../../../package.json': path.resolve(__dirname, 'package.json'), + }, + extensions: ['.js', '.json', '.ts'], + }, + module: { + rules: [ + { + test: /\.tsx?$/, + use: 'ts-loader', + exclude: /node_modules/, + }, + { + test: /node_modules[\\/]@grpc[\\/]grpc-js/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]grpc/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]retry-request/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]https?-proxy-agent/, + use: 'null-loader', + }, + { + test: /node_modules[\\/]gtoken/, + use: 'null-loader', + }, + ], + }, + mode: 'production', +}; diff --git a/release-please-config.json b/release-please-config.json index fcf9664c081..c3a7da6ced6 100644 --- a/release-please-config.json +++ b/release-please-config.json @@ -191,6 +191,7 @@ "packages/google-shopping-merchant-accounts": {}, "packages/google-cloud-gdchardwaremanagement": {}, "packages/google-cloud-apihub": {}, + "packages/google-marketingplatform-admin": {}, "packages/google-cloud-oracledatabase": {} }, "plugins": [ From 88083e4a879ef6963eca9183c037ef84b861efed Mon Sep 17 00:00:00 2001 From: "gcf-owl-bot[bot]" <78513119+gcf-owl-bot[bot]@users.noreply.github.com> Date: Wed, 9 Oct 2024 18:04:09 -0700 Subject: [PATCH 7/8] feat: [container] add an effective_cgroup_mode field in node config (#5741) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * feat: add an effective_cgroup_mode field in node config feat: add storage pools field to NodePool API feat: Add ControlPlaneEndpointsConfig message to consolidate control plane isolation options feat: Add DNSEndpointConfig for new DNS-based control plane access Moves control plane and node isolation fields to respective objects for better semantics, deprecating former locations. Introduces new DNS-based access to control plane, simplifying control plane access. feat: add API to enable/disable secret manager csi component on GKE clusters feat: Add CompliancePosture field for configuration of GKE Compliance Posture product feat: Add RBACBindingConfig to API feat: Add CompliancePosture field for configuration of GKE Compliance Posture product feat: Add KCP_SSHD and KCP_CONNECTION to the supported values for the --logging flag for the create and update cluster commands feat: surface upgrade_target_version in GetServerConfig for all supported release channels feat: added support for Parallelstore CSI Driver docs: Minor documentation updates PiperOrigin-RevId: 684119299 Source-Link: https://github.com/googleapis/googleapis/commit/1f77391203115a5740dd8815b13842f661f303df Source-Link: https://github.com/googleapis/googleapis-gen/commit/fa5cccba80771b6170d81522d48a6387c29c3c78 Copy-Tag: eyJwIjoicGFja2FnZXMvZ29vZ2xlLWNvbnRhaW5lci8uT3dsQm90LnlhbWwiLCJoIjoiZmE1Y2NjYmE4MDc3MWI2MTcwZDgxNTIyZDQ4YTYzODdjMjljM2M3OCJ9 * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: Owl Bot Co-authored-by: sofisl <55454395+sofisl@users.noreply.github.com> --- packages/google-container/README.md | 4 +- .../google/container/v1/cluster_service.proto | 351 +- packages/google-container/protos/protos.d.ts | 1461 ++++- packages/google-container/protos/protos.js | 4959 ++++++++++++++--- packages/google-container/protos/protos.json | 470 +- .../v1/cluster_manager.update_node_pool.js | 5 + .../snippet_metadata_google.container.v1.json | 6 +- .../src/v1/cluster_manager_client.ts | 159 + .../test/gapic_cluster_manager_v1.ts | 158 + 9 files changed, 6500 insertions(+), 1073 deletions(-) diff --git a/packages/google-container/README.md b/packages/google-container/README.md index 1c53f766746..f32f00f5936 100644 --- a/packages/google-container/README.md +++ b/packages/google-container/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Kubernetes Engine Cluster Manager API API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -228,4 +228,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [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=container.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-container/protos/google/container/v1/cluster_service.proto b/packages/google-container/protos/google/container/v1/cluster_service.proto index ba8730d3d57..f79bff88adf 100644 --- a/packages/google-container/protos/google/container/v1/cluster_service.proto +++ b/packages/google-container/protos/google/container/v1/cluster_service.proto @@ -38,6 +38,14 @@ option (google.api.resource_definition) = { type: "pubsub.googleapis.com/Topic" pattern: "projects/{project}/topics/{topic}" }; +option (google.api.resource_definition) = { + type: "privateca.googleapis.com/CaPool" + pattern: "projects/{project}/locations/{location}/caPools/{ca_pool}" +}; +option (google.api.resource_definition) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + pattern: "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" +}; // Google Kubernetes Engine Cluster Manager v1 service ClusterManager { @@ -639,6 +647,21 @@ message NodeKubeletConfig { // [AutoprovisioningNodePoolDefaults][google.container.v1.AutoprovisioningNodePoolDefaults] // instead. message NodeConfig { + // Possible effective cgroup modes for the node. + enum EffectiveCgroupMode { + // EFFECTIVE_CGROUP_MODE_UNSPECIFIED means the cgroup configuration for the + // node pool is unspecified, i.e. the node pool is a Windows node pool. + EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0; + + // CGROUP_MODE_V1 means the node pool is configured to use cgroupv1 for the + // cgroup configuration. + EFFECTIVE_CGROUP_MODE_V1 = 1; + + // CGROUP_MODE_V2 means the node pool is configured to use cgroupv2 for the + // cgroup configuration. + EFFECTIVE_CGROUP_MODE_V2 = 2; + } + // The name of a Google Compute Engine [machine // type](https://cloud.google.com/compute/docs/machine-types) // @@ -857,9 +880,19 @@ message NodeConfig { // List of secondary boot disks attached to the nodes. repeated SecondaryBootDisk secondary_boot_disks = 48; + // List of Storage Pools where boot disks are provisioned. + repeated string storage_pools = 49; + // Secondary boot disk update strategy. optional SecondaryBootDiskUpdateStrategy secondary_boot_disk_update_strategy = 50; + + // Output only. effective_cgroup_mode is the cgroup mode actually used by the + // node pool. It is determined by the cgroup mode specified in the + // LinuxNodeConfig or the default cgroup mode based on the cluster creation + // version. + EffectiveCgroupMode effective_cgroup_mode = 55 + [(google.api.field_behavior) = OUTPUT_ONLY]; } // Specifies options for controlling advanced machine features. @@ -933,7 +966,7 @@ message NodeNetworkConfig { // Whether nodes have internal IP addresses only. // If enable_private_nodes is not specified, then the value is derived from - // [cluster.privateClusterConfig.enablePrivateNodes][google.container.v1beta1.PrivateClusterConfig.enablePrivateNodes] + // [Cluster.NetworkConfig.default_enable_private_nodes][] optional bool enable_private_nodes = 9; // Network bandwidth tier configuration. @@ -1242,7 +1275,8 @@ message MasterAuth { [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Base64-encoded public certificate used by clients to - // authenticate to the cluster endpoint. + // authenticate to the cluster endpoint. Issued only if + // client_certificate_config is set. string client_certificate = 101 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Base64-encoded private key used by clients to authenticate @@ -1307,6 +1341,9 @@ message AddonsConfig { StatefulHAConfig stateful_ha_config = 18 [(google.api.field_behavior) = OPTIONAL]; + // Configuration for the Cloud Storage Parallelstore CSI driver. + ParallelstoreCsiDriverConfig parallelstore_csi_driver_config = 19; + // Optional. Configuration for Ray Operator addon. RayOperatorConfig ray_operator_config = 21 [(google.api.field_behavior) = OPTIONAL]; @@ -1362,10 +1399,19 @@ message PrivateClusterConfig { // Whether nodes have internal IP addresses only. If enabled, all nodes are // given only RFC 1918 private addresses and communicate with the master via // private networking. - bool enable_private_nodes = 1; + // + // Deprecated: Use + // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] + // instead. + bool enable_private_nodes = 1 [deprecated = true]; // Whether the master's internal IP address is used as the cluster endpoint. - bool enable_private_endpoint = 2; + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_public_endpoint] + // instead. Note that the value of enable_public_endpoint is reversed: if + // enable_private_endpoint is false, then enable_public_endpoint will be true. + bool enable_private_endpoint = 2 [deprecated = true]; // The IP range in CIDR notation to use for the hosted master network. This // range will be used for assigning internal IP addresses to the master or @@ -1374,20 +1420,39 @@ message PrivateClusterConfig { string master_ipv4_cidr_block = 3; // Output only. The internal IP address of this cluster's master endpoint. - string private_endpoint = 4 [(google.api.field_behavior) = OUTPUT_ONLY]; + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint] + // instead. + string private_endpoint = 4 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The external IP address of this cluster's master endpoint. - string public_endpoint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + // + // Deprecated:Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.public_endpoint] + // instead. + string public_endpoint = 5 + [deprecated = true, (google.api.field_behavior) = OUTPUT_ONLY]; // Output only. The peering name in the customer VPC used by this cluster. string peering_name = 7 [(google.api.field_behavior) = OUTPUT_ONLY]; // Controls master global access settings. - PrivateClusterMasterGlobalAccessConfig master_global_access_config = 8; + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.enable_global_access][] + // instead. + PrivateClusterMasterGlobalAccessConfig master_global_access_config = 8 + [deprecated = true]; // Subnet to provision the master's private endpoint during cluster creation. // Specified in projects/*/regions/*/subnetworks/* format. - string private_endpoint_subnetwork = 10; + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.private_endpoint_subnetwork] + // instead. + string private_endpoint_subnetwork = 10 [deprecated = true]; } // Configuration for returning group information from authenticators. @@ -1446,6 +1511,13 @@ message GcsFuseCsiDriverConfig { bool enabled = 1; } +// Configuration for the Cloud Storage Parallelstore CSI driver. +message ParallelstoreCsiDriverConfig { + // Whether the Cloud Storage Parallelstore CSI driver is enabled for this + // cluster. + bool enabled = 1; +} + // Configuration options for the Ray Operator add-on. message RayOperatorConfig { // Whether the Ray Operator addon is enabled for this cluster. @@ -1495,6 +1567,9 @@ message MasterAuthorizedNetworksConfig { // Whether master is accessbile via Google Compute Engine Public IP addresses. optional bool gcp_public_cidrs_access_enabled = 3; + + // Whether master authorized networks is enforced on private endpoint or not. + optional bool private_endpoint_enforcement_enabled = 5; } // Configuration for the legacy Attribute Based Access Control authorization @@ -1884,7 +1959,12 @@ message Cluster { IPAllocationPolicy ip_allocation_policy = 20; // The configuration options for master authorized networks feature. - MasterAuthorizedNetworksConfig master_authorized_networks_config = 22; + // + // Deprecated: Use + // [ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config][google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorized_networks_config] + // instead. + MasterAuthorizedNetworksConfig master_authorized_networks_config = 22 + [deprecated = true]; // Configure the maintenance policy for this cluster. MaintenancePolicy maintenance_policy = 23; @@ -2083,17 +2163,135 @@ message Cluster { // Enable/Disable Security Posture API features for the cluster. SecurityPostureConfig security_posture_config = 145; + // Configuration for all cluster's control plane endpoints. + ControlPlaneEndpointsConfig control_plane_endpoints_config = 146; + // Beta APIs Config K8sBetaAPIConfig enable_k8s_beta_apis = 143; // GKE Enterprise Configuration. EnterpriseConfig enterprise_config = 149; + // Secret CSI driver configuration. + SecretManagerConfig secret_manager_config = 150; + + // Enable/Disable Compliance Posture features for the cluster. + CompliancePostureConfig compliance_posture_config = 151; + // Output only. Reserved for future use. optional bool satisfies_pzs = 152 [(google.api.field_behavior) = OUTPUT_ONLY]; // Output only. Reserved for future use. optional bool satisfies_pzi = 153 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // The Custom keys configuration for the cluster. + optional UserManagedKeysConfig user_managed_keys_config = 154; + + // RBACBindingConfig allows user to restrict ClusterRoleBindings an + // RoleBindings that can be created. + optional RBACBindingConfig rbac_binding_config = 156; +} + +// RBACBindingConfig allows user to restrict ClusterRoleBindings an RoleBindings +// that can be created. +message RBACBindingConfig { + // Setting this to true will allow any ClusterRoleBinding and RoleBinding + // with subjets system:anonymous or system:unauthenticated. + optional bool enable_insecure_binding_system_unauthenticated = 1; + + // Setting this to true will allow any ClusterRoleBinding and RoleBinding + // with subjects system:authenticated. + optional bool enable_insecure_binding_system_authenticated = 2; +} + +// UserManagedKeysConfig holds the resource address to Keys which are used +// for signing certs and token that are used for communication within cluster. +message UserManagedKeysConfig { + // The Certificate Authority Service caPool to use for the cluster CA in this + // cluster. + string cluster_ca = 10 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // Resource path of the Certificate Authority Service caPool to use for the + // etcd API CA in this cluster. + string etcd_api_ca = 11 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // Resource path of the Certificate Authority Service caPool to use for the + // etcd peer CA in this cluster. + string etcd_peer_ca = 12 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // The Cloud KMS cryptoKeyVersions to use for signing service account JWTs + // issued by this cluster. + // + // Format: + // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` + repeated string service_account_signing_keys = 13 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // The Cloud KMS cryptoKeyVersions to use for verifying service account JWTs + // issued by this cluster. + // + // Format: + // `projects/{project}/locations/{location}/keyRings/{keyring}/cryptoKeys/{cryptoKey}/cryptoKeyVersions/{cryptoKeyVersion}` + repeated string service_account_verification_keys = 14 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // The Certificate Authority Service caPool to use for the aggregation CA in + // this cluster. + string aggregation_ca = 15 [(google.api.resource_reference) = { + type: "privateca.googleapis.com/CaPool" + }]; + + // The Cloud KMS cryptoKey to use for Confidential Hyperdisk on the control + // plane nodes. + string control_plane_disk_encryption_key = 16 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; + + // Resource path of the Cloud KMS cryptoKey to use for encryption of internal + // etcd backups. + string gkeops_etcd_backup_encryption_key = 17 + [(google.api.resource_reference) = { + type: "cloudkms.googleapis.com/CryptoKeyVersion" + }]; +} + +// CompliancePostureConfig defines the settings needed to enable/disable +// features for the Compliance Posture. +message CompliancePostureConfig { + // Mode defines enablement mode for Compliance Posture. + enum Mode { + // Default value not specified. + MODE_UNSPECIFIED = 0; + + // Disables Compliance Posture features on the cluster. + DISABLED = 1; + + // Enables Compliance Posture features on the cluster. + ENABLED = 2; + } + + // Defines the details of a compliance standard. + message ComplianceStandard { + // Name of the compliance standard. + optional string standard = 1; + } + + // Defines the enablement mode for Compliance Posture. + optional Mode mode = 1; + + // List of enabled compliance standards. + repeated ComplianceStandard compliance_standards = 2; } // K8sBetaAPIConfig , configuration for beta APIs @@ -2264,7 +2462,12 @@ message ClusterUpdate { repeated string desired_locations = 10; // The desired configuration options for master authorized networks feature. - MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12; + // + // Deprecated: Use + // desired_control_plane_endpoints_config.ip_endpoints_config.authorized_networks_config + // instead. + MasterAuthorizedNetworksConfig desired_master_authorized_networks_config = 12 + [deprecated = true]; // Cluster-level autoscaling configuration. ClusterAutoscaling desired_cluster_autoscaling = 15; @@ -2297,7 +2500,11 @@ message ClusterUpdate { // [ClusterUpdate.desired_enable_private_endpoint][google.container.v1.ClusterUpdate.desired_enable_private_endpoint] // for modifying other fields within // [PrivateClusterConfig][google.container.v1.PrivateClusterConfig]. - PrivateClusterConfig desired_private_cluster_config = 25; + // + // Deprecated: Use + // desired_control_plane_endpoints_config.ip_endpoints_config.global_access + // instead. + PrivateClusterConfig desired_private_cluster_config = 25 [deprecated = true]; // The desired config of Intra-node visibility. IntraNodeVisibilityConfig desired_intra_node_visibility_config = 26; @@ -2337,7 +2544,22 @@ message ClusterUpdate { ServiceExternalIPsConfig desired_service_external_ips_config = 60; // Enable/Disable private endpoint for the cluster's master. - optional bool desired_enable_private_endpoint = 71; + // + // Deprecated: Use + // desired_control_plane_endpoints_config.ip_endpoints_config.enable_public_endpoint + // instead. Note that the value of enable_public_endpoint is reversed: if + // enable_private_endpoint is false, then enable_public_endpoint will be true. + optional bool desired_enable_private_endpoint = 71 [deprecated = true]; + + // Override the default setting of whether future created + // nodes have private IP addresses only, namely + // [NetworkConfig.default_enable_private_nodes][google.container.v1.NetworkConfig.default_enable_private_nodes] + optional bool desired_default_enable_private_nodes = 72; + + // [Control plane + // endpoints][google.container.v1.Cluster.control_plane_endpoints_config] + // configuration. + ControlPlaneEndpointsConfig desired_control_plane_endpoints_config = 73; // The Kubernetes version to change the master to. // @@ -2421,12 +2643,25 @@ message ClusterUpdate { // Enable/Disable Cilium Clusterwide Network Policy for the cluster. optional bool desired_enable_cilium_clusterwide_network_policy = 138; + // Enable/Disable Secret Manager Config. + optional SecretManagerConfig desired_secret_manager_config = 139; + + // Enable/Disable Compliance Posture features for the cluster. + optional CompliancePostureConfig desired_compliance_posture_config = 140; + // The desired node kubelet config for the cluster. NodeKubeletConfig desired_node_kubelet_config = 141; // The desired node kubelet config for all auto-provisioned node pools // in autopilot clusters and node auto-provisioning enabled clusters. NodeKubeletConfig desired_node_pool_auto_config_kubelet_config = 142; + + // The Custom keys configuration for the cluster. + UserManagedKeysConfig user_managed_keys_config = 143; + + // RBACBindingConfig allows user to restrict ClusterRoleBindings an + // RoleBindings that can be created. + optional RBACBindingConfig desired_rbac_binding_config = 144; } // AdditionalPodRangesConfig is the configuration for additional pod secondary @@ -2922,6 +3157,10 @@ message UpdateNodePoolRequest { // Specifies the configuration of queued provisioning. NodePool.QueuedProvisioning queued_provisioning = 42; + + // List of Storage Pools where boot disks are provisioned. + // Existing Storage Pools will be replaced with storage-pools. + repeated string storage_pools = 43; } // SetNodePoolAutoscalingRequest sets the autoscaler settings of a node pool. @@ -3316,6 +3555,9 @@ message ServerConfig { // List of valid versions for the channel. repeated string valid_versions = 4; + + // The auto upgrade target version for clusters on the channel. + string upgrade_target_version = 5; } // Version of Kubernetes the service deploys by default. @@ -4555,6 +4797,13 @@ message NetworkConfig { // Whether CiliumClusterwideNetworkPolicy is enabled on this cluster. optional bool enable_cilium_clusterwide_network_policy = 21; + + // Controls whether by default nodes have private IP addresses only. + // It is invalid to specify both [PrivateClusterConfig.enablePrivateNodes][] + // and this field at the same time. + // To update the default setting, use + // [ClusterUpdate.desired_default_enable_private_nodes][google.container.v1.ClusterUpdate.desired_default_enable_private_nodes] + optional bool default_enable_private_nodes = 22; } // GatewayAPIConfig contains the desired config of Gateway API on this cluster. @@ -5305,6 +5554,12 @@ message LoggingComponentConfig { // kube-controller-manager CONTROLLER_MANAGER = 5; + + // kcp-sshd + KCP_SSHD = 7; + + // kcp connection logs + KCP_CONNECTION = 8; } // Select components to collect logs. An empty set would disable all logging. @@ -5508,6 +5763,70 @@ enum StackType { IPV4_IPV6 = 2; } +// Configuration for all of the cluster's control plane endpoints. +message ControlPlaneEndpointsConfig { + // Describes the configuration of a DNS endpoint. + message DNSEndpointConfig { + // Output only. The cluster's DNS endpoint configuration. + // A DNS format address. This is accessible from the public internet. + // Ex: uid.us-central1.gke.goog. + // Always present, but the behavior may change according to the value of + // [DNSEndpointConfig.allow_external_traffic][google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.allow_external_traffic]. + string endpoint = 2 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Controls whether user traffic is allowed over this endpoint. Note that + // GCP-managed services may still use the endpoint even if this is false. + optional bool allow_external_traffic = 3; + } + + // IP endpoints configuration. + message IPEndpointsConfig { + // Controls whether to allow direct IP access. + optional bool enabled = 1; + + // Controls whether the control plane allows access through a public IP. + // It is invalid to specify both + // [PrivateClusterConfig.enablePrivateEndpoint][] and this field at the same + // time. + optional bool enable_public_endpoint = 2; + + // Controls whether the control plane's private endpoint is accessible from + // sources in other regions. + // It is invalid to specify both + // [PrivateClusterMasterGlobalAccessConfig.enabled][google.container.v1.PrivateClusterMasterGlobalAccessConfig.enabled] + // and this field at the same time. + optional bool global_access = 3; + + // Configuration of authorized networks. If enabled, restricts access to the + // control plane based on source IP. + // It is invalid to specify both + // [Cluster.masterAuthorizedNetworksConfig][] and this field at the same + // time. + MasterAuthorizedNetworksConfig authorized_networks_config = 4; + + // Output only. The external IP address of this cluster's control plane. + // Only populated if enabled. + string public_endpoint = 5 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Output only. The internal IP address of this cluster's control plane. + // Only populated if enabled. + string private_endpoint = 6 [(google.api.field_behavior) = OUTPUT_ONLY]; + + // Subnet to provision the master's private endpoint during cluster + // creation. Specified in projects/*/regions/*/subnetworks/* format. It is + // invalid to specify both + // [PrivateClusterConfig.privateEndpointSubnetwork][] and this field at the + // same time. + string private_endpoint_subnetwork = 7; + } + + // DNS endpoint configuration. + DNSEndpointConfig dns_endpoint_config = 1; + + // IP endpoints configuration. + IPEndpointsConfig ip_endpoints_config = 3; +} + // Possible values for IPv6 access type enum IPv6AccessType { // Default value, will be defaulted as type external. @@ -5594,10 +5913,16 @@ message EnterpriseConfig { ENTERPRISE = 2; } - // Output only. cluster_tier specifies the premium tier of the cluster. + // Output only. cluster_tier indicates the effective tier of the cluster. ClusterTier cluster_tier = 1 [(google.api.field_behavior) = OUTPUT_ONLY]; } +// SecretManagerConfig is config for secret manager enablement. +message SecretManagerConfig { + // Enable/Disable Secret Manager Config. + optional bool enabled = 1; +} + // SecondaryBootDisk represents a persistent disk attached to a node // with special configurations based on its mode. message SecondaryBootDisk { diff --git a/packages/google-container/protos/protos.d.ts b/packages/google-container/protos/protos.d.ts index 7febc877131..52965e8acd3 100644 --- a/packages/google-container/protos/protos.d.ts +++ b/packages/google-container/protos/protos.d.ts @@ -1340,8 +1340,14 @@ export namespace google { /** NodeConfig secondaryBootDisks */ secondaryBootDisks?: (google.container.v1.ISecondaryBootDisk[]|null); + /** NodeConfig storagePools */ + storagePools?: (string[]|null); + /** NodeConfig secondaryBootDiskUpdateStrategy */ secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); + + /** NodeConfig effectiveCgroupMode */ + effectiveCgroupMode?: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode|null); } /** Represents a NodeConfig. */ @@ -1467,9 +1473,15 @@ export namespace google { /** NodeConfig secondaryBootDisks. */ public secondaryBootDisks: google.container.v1.ISecondaryBootDisk[]; + /** NodeConfig storagePools. */ + public storagePools: string[]; + /** NodeConfig secondaryBootDiskUpdateStrategy. */ public secondaryBootDiskUpdateStrategy?: (google.container.v1.ISecondaryBootDiskUpdateStrategy|null); + /** NodeConfig effectiveCgroupMode. */ + public effectiveCgroupMode: (google.container.v1.NodeConfig.EffectiveCgroupMode|keyof typeof google.container.v1.NodeConfig.EffectiveCgroupMode); + /** NodeConfig _fastSocket. */ public _fastSocket?: "fastSocket"; @@ -1554,6 +1566,16 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + namespace NodeConfig { + + /** EffectiveCgroupMode enum. */ + enum EffectiveCgroupMode { + EFFECTIVE_CGROUP_MODE_UNSPECIFIED = 0, + EFFECTIVE_CGROUP_MODE_V1 = 1, + EFFECTIVE_CGROUP_MODE_V2 = 2 + } + } + /** Properties of an AdvancedMachineFeatures. */ interface IAdvancedMachineFeatures { @@ -3969,6 +3991,9 @@ export namespace google { /** AddonsConfig statefulHaConfig */ statefulHaConfig?: (google.container.v1.IStatefulHAConfig|null); + /** AddonsConfig parallelstoreCsiDriverConfig */ + parallelstoreCsiDriverConfig?: (google.container.v1.IParallelstoreCsiDriverConfig|null); + /** AddonsConfig rayOperatorConfig */ rayOperatorConfig?: (google.container.v1.IRayOperatorConfig|null); } @@ -4018,6 +4043,9 @@ export namespace google { /** AddonsConfig statefulHaConfig. */ public statefulHaConfig?: (google.container.v1.IStatefulHAConfig|null); + /** AddonsConfig parallelstoreCsiDriverConfig. */ + public parallelstoreCsiDriverConfig?: (google.container.v1.IParallelstoreCsiDriverConfig|null); + /** AddonsConfig rayOperatorConfig. */ public rayOperatorConfig?: (google.container.v1.IRayOperatorConfig|null); @@ -5424,6 +5452,103 @@ export namespace google { public static getTypeUrl(typeUrlPrefix?: string): string; } + /** Properties of a ParallelstoreCsiDriverConfig. */ + interface IParallelstoreCsiDriverConfig { + + /** ParallelstoreCsiDriverConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a ParallelstoreCsiDriverConfig. */ + class ParallelstoreCsiDriverConfig implements IParallelstoreCsiDriverConfig { + + /** + * Constructs a new ParallelstoreCsiDriverConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IParallelstoreCsiDriverConfig); + + /** ParallelstoreCsiDriverConfig enabled. */ + public enabled: boolean; + + /** + * Creates a new ParallelstoreCsiDriverConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ParallelstoreCsiDriverConfig instance + */ + public static create(properties?: google.container.v1.IParallelstoreCsiDriverConfig): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @param message ParallelstoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IParallelstoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @param message ParallelstoreCsiDriverConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IParallelstoreCsiDriverConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Verifies a ParallelstoreCsiDriverConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ParallelstoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ParallelstoreCsiDriverConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ParallelstoreCsiDriverConfig; + + /** + * Creates a plain object from a ParallelstoreCsiDriverConfig message. Also converts values to other types if specified. + * @param message ParallelstoreCsiDriverConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ParallelstoreCsiDriverConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ParallelstoreCsiDriverConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ParallelstoreCsiDriverConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a RayOperatorConfig. */ interface IRayOperatorConfig { @@ -5738,6 +5863,9 @@ export namespace google { /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled */ gcpPublicCidrsAccessEnabled?: (boolean|null); + + /** MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled */ + privateEndpointEnforcementEnabled?: (boolean|null); } /** Represents a MasterAuthorizedNetworksConfig. */ @@ -5758,9 +5886,15 @@ export namespace google { /** MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled. */ public gcpPublicCidrsAccessEnabled?: (boolean|null); + /** MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled. */ + public privateEndpointEnforcementEnabled?: (boolean|null); + /** MasterAuthorizedNetworksConfig _gcpPublicCidrsAccessEnabled. */ public _gcpPublicCidrsAccessEnabled?: "gcpPublicCidrsAccessEnabled"; + /** MasterAuthorizedNetworksConfig _privateEndpointEnforcementEnabled. */ + public _privateEndpointEnforcementEnabled?: "privateEndpointEnforcementEnabled"; + /** * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. * @param [properties] Properties to set @@ -6773,17 +6907,32 @@ export namespace google { /** Cluster securityPostureConfig */ securityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); + /** Cluster controlPlaneEndpointsConfig */ + controlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + /** Cluster enableK8sBetaApis */ enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); /** Cluster enterpriseConfig */ enterpriseConfig?: (google.container.v1.IEnterpriseConfig|null); + /** Cluster secretManagerConfig */ + secretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** Cluster compliancePostureConfig */ + compliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + /** Cluster satisfiesPzs */ satisfiesPzs?: (boolean|null); /** Cluster satisfiesPzi */ satisfiesPzi?: (boolean|null); + + /** Cluster userManagedKeysConfig */ + userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** Cluster rbacBindingConfig */ + rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); } /** Represents a Cluster. */ @@ -6990,18 +7139,33 @@ export namespace google { /** Cluster securityPostureConfig. */ public securityPostureConfig?: (google.container.v1.ISecurityPostureConfig|null); + /** Cluster controlPlaneEndpointsConfig. */ + public controlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + /** Cluster enableK8sBetaApis. */ public enableK8sBetaApis?: (google.container.v1.IK8sBetaAPIConfig|null); /** Cluster enterpriseConfig. */ public enterpriseConfig?: (google.container.v1.IEnterpriseConfig|null); + /** Cluster secretManagerConfig. */ + public secretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** Cluster compliancePostureConfig. */ + public compliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + /** Cluster satisfiesPzs. */ public satisfiesPzs?: (boolean|null); /** Cluster satisfiesPzi. */ public satisfiesPzi?: (boolean|null); + /** Cluster userManagedKeysConfig. */ + public userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** Cluster rbacBindingConfig. */ + public rbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** Cluster _nodePoolDefaults. */ public _nodePoolDefaults?: "nodePoolDefaults"; @@ -7011,6 +7175,12 @@ export namespace google { /** Cluster _satisfiesPzi. */ public _satisfiesPzi?: "satisfiesPzi"; + /** Cluster _userManagedKeysConfig. */ + public _userManagedKeysConfig?: "userManagedKeysConfig"; + + /** Cluster _rbacBindingConfig. */ + public _rbacBindingConfig?: "rbacBindingConfig"; + /** * Creates a new Cluster instance using the specified properties. * @param [properties] Properties to set @@ -7103,303 +7273,767 @@ export namespace google { } } - /** Properties of a K8sBetaAPIConfig. */ - interface IK8sBetaAPIConfig { + /** Properties of a RBACBindingConfig. */ + interface IRBACBindingConfig { - /** K8sBetaAPIConfig enabledApis */ - enabledApis?: (string[]|null); + /** RBACBindingConfig enableInsecureBindingSystemUnauthenticated */ + enableInsecureBindingSystemUnauthenticated?: (boolean|null); + + /** RBACBindingConfig enableInsecureBindingSystemAuthenticated */ + enableInsecureBindingSystemAuthenticated?: (boolean|null); } - /** Represents a K8sBetaAPIConfig. */ - class K8sBetaAPIConfig implements IK8sBetaAPIConfig { + /** Represents a RBACBindingConfig. */ + class RBACBindingConfig implements IRBACBindingConfig { /** - * Constructs a new K8sBetaAPIConfig. + * Constructs a new RBACBindingConfig. * @param [properties] Properties to set */ - constructor(properties?: google.container.v1.IK8sBetaAPIConfig); + constructor(properties?: google.container.v1.IRBACBindingConfig); - /** K8sBetaAPIConfig enabledApis. */ - public enabledApis: string[]; + /** RBACBindingConfig enableInsecureBindingSystemUnauthenticated. */ + public enableInsecureBindingSystemUnauthenticated?: (boolean|null); + + /** RBACBindingConfig enableInsecureBindingSystemAuthenticated. */ + public enableInsecureBindingSystemAuthenticated?: (boolean|null); + + /** RBACBindingConfig _enableInsecureBindingSystemUnauthenticated. */ + public _enableInsecureBindingSystemUnauthenticated?: "enableInsecureBindingSystemUnauthenticated"; + + /** RBACBindingConfig _enableInsecureBindingSystemAuthenticated. */ + public _enableInsecureBindingSystemAuthenticated?: "enableInsecureBindingSystemAuthenticated"; /** - * Creates a new K8sBetaAPIConfig instance using the specified properties. + * Creates a new RBACBindingConfig instance using the specified properties. * @param [properties] Properties to set - * @returns K8sBetaAPIConfig instance + * @returns RBACBindingConfig instance */ - public static create(properties?: google.container.v1.IK8sBetaAPIConfig): google.container.v1.K8sBetaAPIConfig; + public static create(properties?: google.container.v1.IRBACBindingConfig): google.container.v1.RBACBindingConfig; /** - * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. - * @param message K8sBetaAPIConfig message or plain object to encode + * Encodes the specified RBACBindingConfig message. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. + * @param message RBACBindingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.container.v1.IRBACBindingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. - * @param message K8sBetaAPIConfig message or plain object to encode + * Encodes the specified RBACBindingConfig message, length delimited. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. + * @param message RBACBindingConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.container.v1.IRBACBindingConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * Decodes a RBACBindingConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns K8sBetaAPIConfig + * @returns RBACBindingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.K8sBetaAPIConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.RBACBindingConfig; /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * Decodes a RBACBindingConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns K8sBetaAPIConfig + * @returns RBACBindingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.K8sBetaAPIConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.RBACBindingConfig; /** - * Verifies a K8sBetaAPIConfig message. + * Verifies a RBACBindingConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RBACBindingConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns K8sBetaAPIConfig + * @returns RBACBindingConfig */ - public static fromObject(object: { [k: string]: any }): google.container.v1.K8sBetaAPIConfig; + public static fromObject(object: { [k: string]: any }): google.container.v1.RBACBindingConfig; /** - * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. - * @param message K8sBetaAPIConfig + * Creates a plain object from a RBACBindingConfig message. Also converts values to other types if specified. + * @param message RBACBindingConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.container.v1.K8sBetaAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.container.v1.RBACBindingConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this K8sBetaAPIConfig to JSON. + * Converts this RBACBindingConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for K8sBetaAPIConfig + * Gets the default type url for RBACBindingConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** Properties of a SecurityPostureConfig. */ - interface ISecurityPostureConfig { + /** Properties of a UserManagedKeysConfig. */ + interface IUserManagedKeysConfig { - /** SecurityPostureConfig mode */ - mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); + /** UserManagedKeysConfig clusterCa */ + clusterCa?: (string|null); - /** SecurityPostureConfig vulnerabilityMode */ - vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); + /** UserManagedKeysConfig etcdApiCa */ + etcdApiCa?: (string|null); + + /** UserManagedKeysConfig etcdPeerCa */ + etcdPeerCa?: (string|null); + + /** UserManagedKeysConfig serviceAccountSigningKeys */ + serviceAccountSigningKeys?: (string[]|null); + + /** UserManagedKeysConfig serviceAccountVerificationKeys */ + serviceAccountVerificationKeys?: (string[]|null); + + /** UserManagedKeysConfig aggregationCa */ + aggregationCa?: (string|null); + + /** UserManagedKeysConfig controlPlaneDiskEncryptionKey */ + controlPlaneDiskEncryptionKey?: (string|null); + + /** UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey */ + gkeopsEtcdBackupEncryptionKey?: (string|null); } - /** Represents a SecurityPostureConfig. */ - class SecurityPostureConfig implements ISecurityPostureConfig { + /** Represents a UserManagedKeysConfig. */ + class UserManagedKeysConfig implements IUserManagedKeysConfig { /** - * Constructs a new SecurityPostureConfig. + * Constructs a new UserManagedKeysConfig. * @param [properties] Properties to set */ - constructor(properties?: google.container.v1.ISecurityPostureConfig); + constructor(properties?: google.container.v1.IUserManagedKeysConfig); - /** SecurityPostureConfig mode. */ - public mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); + /** UserManagedKeysConfig clusterCa. */ + public clusterCa: string; - /** SecurityPostureConfig vulnerabilityMode. */ - public vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); + /** UserManagedKeysConfig etcdApiCa. */ + public etcdApiCa: string; - /** SecurityPostureConfig _mode. */ - public _mode?: "mode"; + /** UserManagedKeysConfig etcdPeerCa. */ + public etcdPeerCa: string; - /** SecurityPostureConfig _vulnerabilityMode. */ - public _vulnerabilityMode?: "vulnerabilityMode"; + /** UserManagedKeysConfig serviceAccountSigningKeys. */ + public serviceAccountSigningKeys: string[]; + + /** UserManagedKeysConfig serviceAccountVerificationKeys. */ + public serviceAccountVerificationKeys: string[]; + + /** UserManagedKeysConfig aggregationCa. */ + public aggregationCa: string; + + /** UserManagedKeysConfig controlPlaneDiskEncryptionKey. */ + public controlPlaneDiskEncryptionKey: string; + + /** UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey. */ + public gkeopsEtcdBackupEncryptionKey: string; /** - * Creates a new SecurityPostureConfig instance using the specified properties. + * Creates a new UserManagedKeysConfig instance using the specified properties. * @param [properties] Properties to set - * @returns SecurityPostureConfig instance + * @returns UserManagedKeysConfig instance */ - public static create(properties?: google.container.v1.ISecurityPostureConfig): google.container.v1.SecurityPostureConfig; + public static create(properties?: google.container.v1.IUserManagedKeysConfig): google.container.v1.UserManagedKeysConfig; /** - * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. - * @param message SecurityPostureConfig message or plain object to encode + * Encodes the specified UserManagedKeysConfig message. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. + * @param message UserManagedKeysConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.container.v1.IUserManagedKeysConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. - * @param message SecurityPostureConfig message or plain object to encode + * Encodes the specified UserManagedKeysConfig message, length delimited. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. + * @param message UserManagedKeysConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.container.v1.IUserManagedKeysConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * Decodes a UserManagedKeysConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns SecurityPostureConfig + * @returns UserManagedKeysConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecurityPostureConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.UserManagedKeysConfig; /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * Decodes a UserManagedKeysConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns SecurityPostureConfig + * @returns UserManagedKeysConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecurityPostureConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.UserManagedKeysConfig; /** - * Verifies a SecurityPostureConfig message. + * Verifies a UserManagedKeysConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * Creates a UserManagedKeysConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns SecurityPostureConfig + * @returns UserManagedKeysConfig */ - public static fromObject(object: { [k: string]: any }): google.container.v1.SecurityPostureConfig; + public static fromObject(object: { [k: string]: any }): google.container.v1.UserManagedKeysConfig; /** - * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. - * @param message SecurityPostureConfig + * Creates a plain object from a UserManagedKeysConfig message. Also converts values to other types if specified. + * @param message UserManagedKeysConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.container.v1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.container.v1.UserManagedKeysConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this SecurityPostureConfig to JSON. + * Converts this UserManagedKeysConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for SecurityPostureConfig + * Gets the default type url for UserManagedKeysConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - namespace SecurityPostureConfig { - - /** Mode enum. */ - enum Mode { - MODE_UNSPECIFIED = 0, - DISABLED = 1, - BASIC = 2, - ENTERPRISE = 3 - } - - /** VulnerabilityMode enum. */ - enum VulnerabilityMode { - VULNERABILITY_MODE_UNSPECIFIED = 0, - VULNERABILITY_DISABLED = 1, - VULNERABILITY_BASIC = 2, - VULNERABILITY_ENTERPRISE = 3 - } - } - - /** Properties of a NodePoolAutoConfig. */ - interface INodePoolAutoConfig { - - /** NodePoolAutoConfig networkTags */ - networkTags?: (google.container.v1.INetworkTags|null); + /** Properties of a CompliancePostureConfig. */ + interface ICompliancePostureConfig { - /** NodePoolAutoConfig resourceManagerTags */ - resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + /** CompliancePostureConfig mode */ + mode?: (google.container.v1.CompliancePostureConfig.Mode|keyof typeof google.container.v1.CompliancePostureConfig.Mode|null); - /** NodePoolAutoConfig nodeKubeletConfig */ - nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + /** CompliancePostureConfig complianceStandards */ + complianceStandards?: (google.container.v1.CompliancePostureConfig.IComplianceStandard[]|null); } - /** Represents a NodePoolAutoConfig. */ - class NodePoolAutoConfig implements INodePoolAutoConfig { + /** Represents a CompliancePostureConfig. */ + class CompliancePostureConfig implements ICompliancePostureConfig { /** - * Constructs a new NodePoolAutoConfig. + * Constructs a new CompliancePostureConfig. * @param [properties] Properties to set */ - constructor(properties?: google.container.v1.INodePoolAutoConfig); + constructor(properties?: google.container.v1.ICompliancePostureConfig); - /** NodePoolAutoConfig networkTags. */ - public networkTags?: (google.container.v1.INetworkTags|null); + /** CompliancePostureConfig mode. */ + public mode?: (google.container.v1.CompliancePostureConfig.Mode|keyof typeof google.container.v1.CompliancePostureConfig.Mode|null); - /** NodePoolAutoConfig resourceManagerTags. */ - public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + /** CompliancePostureConfig complianceStandards. */ + public complianceStandards: google.container.v1.CompliancePostureConfig.IComplianceStandard[]; - /** NodePoolAutoConfig nodeKubeletConfig. */ - public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + /** CompliancePostureConfig _mode. */ + public _mode?: "mode"; /** - * Creates a new NodePoolAutoConfig instance using the specified properties. + * Creates a new CompliancePostureConfig instance using the specified properties. * @param [properties] Properties to set - * @returns NodePoolAutoConfig instance + * @returns CompliancePostureConfig instance */ - public static create(properties?: google.container.v1.INodePoolAutoConfig): google.container.v1.NodePoolAutoConfig; + public static create(properties?: google.container.v1.ICompliancePostureConfig): google.container.v1.CompliancePostureConfig; /** - * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. - * @param message NodePoolAutoConfig message or plain object to encode + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encode(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encode(message: google.container.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. - * @param message NodePoolAutoConfig message or plain object to encode + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. + * @param message CompliancePostureConfig message or plain object to encode * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.container.v1.ICompliancePostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * Decodes a CompliancePostureConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns NodePoolAutoConfig + * @returns CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolAutoConfig; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompliancePostureConfig; /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns NodePoolAutoConfig + * @returns CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolAutoConfig; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompliancePostureConfig; + + /** + * Verifies a CompliancePostureConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns CompliancePostureConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CompliancePostureConfig; + + /** + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. + * @param message CompliancePostureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CompliancePostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this CompliancePostureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for CompliancePostureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace CompliancePostureConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + ENABLED = 2 + } + + /** Properties of a ComplianceStandard. */ + interface IComplianceStandard { + + /** ComplianceStandard standard */ + standard?: (string|null); + } + + /** Represents a ComplianceStandard. */ + class ComplianceStandard implements IComplianceStandard { + + /** + * Constructs a new ComplianceStandard. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.CompliancePostureConfig.IComplianceStandard); + + /** ComplianceStandard standard. */ + public standard?: (string|null); + + /** ComplianceStandard _standard. */ + public _standard?: "standard"; + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @param [properties] Properties to set + * @returns ComplianceStandard instance + */ + public static create(properties?: google.container.v1.CompliancePostureConfig.IComplianceStandard): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @param message ComplianceStandard message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.CompliancePostureConfig.IComplianceStandard, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Verifies a ComplianceStandard message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns ComplianceStandard + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.CompliancePostureConfig.ComplianceStandard; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @param message ComplianceStandard + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.CompliancePostureConfig.ComplianceStandard, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this ComplianceStandard to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for ComplianceStandard + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + } + + /** Properties of a K8sBetaAPIConfig. */ + interface IK8sBetaAPIConfig { + + /** K8sBetaAPIConfig enabledApis */ + enabledApis?: (string[]|null); + } + + /** Represents a K8sBetaAPIConfig. */ + class K8sBetaAPIConfig implements IK8sBetaAPIConfig { + + /** + * Constructs a new K8sBetaAPIConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IK8sBetaAPIConfig); + + /** K8sBetaAPIConfig enabledApis. */ + public enabledApis: string[]; + + /** + * Creates a new K8sBetaAPIConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns K8sBetaAPIConfig instance + */ + public static create(properties?: google.container.v1.IK8sBetaAPIConfig): google.container.v1.K8sBetaAPIConfig; + + /** + * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * @param message K8sBetaAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * @param message K8sBetaAPIConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IK8sBetaAPIConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.K8sBetaAPIConfig; + + /** + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns K8sBetaAPIConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.K8sBetaAPIConfig; + + /** + * Verifies a K8sBetaAPIConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns K8sBetaAPIConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.K8sBetaAPIConfig; + + /** + * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. + * @param message K8sBetaAPIConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.K8sBetaAPIConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this K8sBetaAPIConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for K8sBetaAPIConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a SecurityPostureConfig. */ + interface ISecurityPostureConfig { + + /** SecurityPostureConfig mode */ + mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); + + /** SecurityPostureConfig vulnerabilityMode */ + vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); + } + + /** Represents a SecurityPostureConfig. */ + class SecurityPostureConfig implements ISecurityPostureConfig { + + /** + * Constructs a new SecurityPostureConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecurityPostureConfig); + + /** SecurityPostureConfig mode. */ + public mode?: (google.container.v1.SecurityPostureConfig.Mode|keyof typeof google.container.v1.SecurityPostureConfig.Mode|null); + + /** SecurityPostureConfig vulnerabilityMode. */ + public vulnerabilityMode?: (google.container.v1.SecurityPostureConfig.VulnerabilityMode|keyof typeof google.container.v1.SecurityPostureConfig.VulnerabilityMode|null); + + /** SecurityPostureConfig _mode. */ + public _mode?: "mode"; + + /** SecurityPostureConfig _vulnerabilityMode. */ + public _vulnerabilityMode?: "vulnerabilityMode"; + + /** + * Creates a new SecurityPostureConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SecurityPostureConfig instance + */ + public static create(properties?: google.container.v1.ISecurityPostureConfig): google.container.v1.SecurityPostureConfig; + + /** + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @param message SecurityPostureConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecurityPostureConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecurityPostureConfig; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecurityPostureConfig; + + /** + * Verifies a SecurityPostureConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecurityPostureConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecurityPostureConfig; + + /** + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @param message SecurityPostureConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecurityPostureConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecurityPostureConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecurityPostureConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + namespace SecurityPostureConfig { + + /** Mode enum. */ + enum Mode { + MODE_UNSPECIFIED = 0, + DISABLED = 1, + BASIC = 2, + ENTERPRISE = 3 + } + + /** VulnerabilityMode enum. */ + enum VulnerabilityMode { + VULNERABILITY_MODE_UNSPECIFIED = 0, + VULNERABILITY_DISABLED = 1, + VULNERABILITY_BASIC = 2, + VULNERABILITY_ENTERPRISE = 3 + } + } + + /** Properties of a NodePoolAutoConfig. */ + interface INodePoolAutoConfig { + + /** NodePoolAutoConfig networkTags */ + networkTags?: (google.container.v1.INetworkTags|null); + + /** NodePoolAutoConfig resourceManagerTags */ + resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** NodePoolAutoConfig nodeKubeletConfig */ + nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + } + + /** Represents a NodePoolAutoConfig. */ + class NodePoolAutoConfig implements INodePoolAutoConfig { + + /** + * Constructs a new NodePoolAutoConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.INodePoolAutoConfig); + + /** NodePoolAutoConfig networkTags. */ + public networkTags?: (google.container.v1.INetworkTags|null); + + /** NodePoolAutoConfig resourceManagerTags. */ + public resourceManagerTags?: (google.container.v1.IResourceManagerTags|null); + + /** NodePoolAutoConfig nodeKubeletConfig. */ + public nodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** + * Creates a new NodePoolAutoConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns NodePoolAutoConfig instance + */ + public static create(properties?: google.container.v1.INodePoolAutoConfig): google.container.v1.NodePoolAutoConfig; + + /** + * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @param message NodePoolAutoConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @param message NodePoolAutoConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.INodePoolAutoConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.NodePoolAutoConfig; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.NodePoolAutoConfig; /** * Verifies a NodePoolAutoConfig message. @@ -7751,6 +8385,12 @@ export namespace google { /** ClusterUpdate desiredEnablePrivateEndpoint */ desiredEnablePrivateEndpoint?: (boolean|null); + /** ClusterUpdate desiredDefaultEnablePrivateNodes */ + desiredDefaultEnablePrivateNodes?: (boolean|null); + + /** ClusterUpdate desiredControlPlaneEndpointsConfig */ + desiredControlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + /** ClusterUpdate desiredMasterVersion */ desiredMasterVersion?: (string|null); @@ -7814,11 +8454,23 @@ export namespace google { /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy */ desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); + /** ClusterUpdate desiredSecretManagerConfig */ + desiredSecretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** ClusterUpdate desiredCompliancePostureConfig */ + desiredCompliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + /** ClusterUpdate desiredNodeKubeletConfig */ desiredNodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig */ desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + + /** ClusterUpdate userManagedKeysConfig */ + userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** ClusterUpdate desiredRbacBindingConfig */ + desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); } /** Represents a ClusterUpdate. */ @@ -7929,6 +8581,12 @@ export namespace google { /** ClusterUpdate desiredEnablePrivateEndpoint. */ public desiredEnablePrivateEndpoint?: (boolean|null); + /** ClusterUpdate desiredDefaultEnablePrivateNodes. */ + public desiredDefaultEnablePrivateNodes?: (boolean|null); + + /** ClusterUpdate desiredControlPlaneEndpointsConfig. */ + public desiredControlPlaneEndpointsConfig?: (google.container.v1.IControlPlaneEndpointsConfig|null); + /** ClusterUpdate desiredMasterVersion. */ public desiredMasterVersion: string; @@ -7992,15 +8650,30 @@ export namespace google { /** ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy. */ public desiredEnableCiliumClusterwideNetworkPolicy?: (boolean|null); + /** ClusterUpdate desiredSecretManagerConfig. */ + public desiredSecretManagerConfig?: (google.container.v1.ISecretManagerConfig|null); + + /** ClusterUpdate desiredCompliancePostureConfig. */ + public desiredCompliancePostureConfig?: (google.container.v1.ICompliancePostureConfig|null); + /** ClusterUpdate desiredNodeKubeletConfig. */ public desiredNodeKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); /** ClusterUpdate desiredNodePoolAutoConfigKubeletConfig. */ public desiredNodePoolAutoConfigKubeletConfig?: (google.container.v1.INodeKubeletConfig|null); + /** ClusterUpdate userManagedKeysConfig. */ + public userManagedKeysConfig?: (google.container.v1.IUserManagedKeysConfig|null); + + /** ClusterUpdate desiredRbacBindingConfig. */ + public desiredRbacBindingConfig?: (google.container.v1.IRBACBindingConfig|null); + /** ClusterUpdate _desiredEnablePrivateEndpoint. */ public _desiredEnablePrivateEndpoint?: "desiredEnablePrivateEndpoint"; + /** ClusterUpdate _desiredDefaultEnablePrivateNodes. */ + public _desiredDefaultEnablePrivateNodes?: "desiredDefaultEnablePrivateNodes"; + /** ClusterUpdate _desiredEnableFqdnNetworkPolicy. */ public _desiredEnableFqdnNetworkPolicy?: "desiredEnableFqdnNetworkPolicy"; @@ -8013,6 +8686,15 @@ export namespace google { /** ClusterUpdate _desiredEnableCiliumClusterwideNetworkPolicy. */ public _desiredEnableCiliumClusterwideNetworkPolicy?: "desiredEnableCiliumClusterwideNetworkPolicy"; + /** ClusterUpdate _desiredSecretManagerConfig. */ + public _desiredSecretManagerConfig?: "desiredSecretManagerConfig"; + + /** ClusterUpdate _desiredCompliancePostureConfig. */ + public _desiredCompliancePostureConfig?: "desiredCompliancePostureConfig"; + + /** ClusterUpdate _desiredRbacBindingConfig. */ + public _desiredRbacBindingConfig?: "desiredRbacBindingConfig"; + /** * Creates a new ClusterUpdate instance using the specified properties. * @param [properties] Properties to set @@ -9195,6 +9877,9 @@ export namespace google { /** UpdateNodePoolRequest queuedProvisioning */ queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); + + /** UpdateNodePoolRequest storagePools */ + storagePools?: (string[]|null); } /** Represents an UpdateNodePoolRequest. */ @@ -9299,6 +9984,9 @@ export namespace google { /** UpdateNodePoolRequest queuedProvisioning. */ public queuedProvisioning?: (google.container.v1.NodePool.IQueuedProvisioning|null); + /** UpdateNodePoolRequest storagePools. */ + public storagePools: string[]; + /** * Creates a new UpdateNodePoolRequest instance using the specified properties. * @param [properties] Properties to set @@ -11265,6 +11953,9 @@ export namespace google { /** ReleaseChannelConfig validVersions */ validVersions?: (string[]|null); + + /** ReleaseChannelConfig upgradeTargetVersion */ + upgradeTargetVersion?: (string|null); } /** Represents a ReleaseChannelConfig. */ @@ -11285,6 +11976,9 @@ export namespace google { /** ReleaseChannelConfig validVersions. */ public validVersions: string[]; + /** ReleaseChannelConfig upgradeTargetVersion. */ + public upgradeTargetVersion: string; + /** * Creates a new ReleaseChannelConfig instance using the specified properties. * @param [properties] Properties to set @@ -16302,6 +16996,9 @@ export namespace google { /** NetworkConfig enableCiliumClusterwideNetworkPolicy */ enableCiliumClusterwideNetworkPolicy?: (boolean|null); + + /** NetworkConfig defaultEnablePrivateNodes */ + defaultEnablePrivateNodes?: (boolean|null); } /** Represents a NetworkConfig. */ @@ -16358,6 +17055,9 @@ export namespace google { /** NetworkConfig enableCiliumClusterwideNetworkPolicy. */ public enableCiliumClusterwideNetworkPolicy?: (boolean|null); + /** NetworkConfig defaultEnablePrivateNodes. */ + public defaultEnablePrivateNodes?: (boolean|null); + /** NetworkConfig _enableFqdnNetworkPolicy. */ public _enableFqdnNetworkPolicy?: "enableFqdnNetworkPolicy"; @@ -16367,6 +17067,9 @@ export namespace google { /** NetworkConfig _enableCiliumClusterwideNetworkPolicy. */ public _enableCiliumClusterwideNetworkPolicy?: "enableCiliumClusterwideNetworkPolicy"; + /** NetworkConfig _defaultEnablePrivateNodes. */ + public _defaultEnablePrivateNodes?: "defaultEnablePrivateNodes"; + /** * Creates a new NetworkConfig instance using the specified properties. * @param [properties] Properties to set @@ -21320,7 +22023,9 @@ export namespace google { WORKLOADS = 2, APISERVER = 3, SCHEDULER = 4, - CONTROLLER_MANAGER = 5 + CONTROLLER_MANAGER = 5, + KCP_SSHD = 7, + KCP_CONNECTION = 8 } } @@ -22235,68 +22940,422 @@ export namespace google { * @param [writer] Writer to encode to * @returns Writer */ - public static encodeDelimited(message: google.container.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + public static encodeDelimited(message: google.container.v1.IFleet, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a Fleet message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns Fleet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Fleet; + + /** + * Decodes a Fleet message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns Fleet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Fleet; + + /** + * Verifies a Fleet message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns Fleet + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.Fleet; + + /** + * Creates a plain object from a Fleet message. Also converts values to other types if specified. + * @param message Fleet + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.Fleet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this Fleet to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for Fleet + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** StackType enum. */ + enum StackType { + STACK_TYPE_UNSPECIFIED = 0, + IPV4 = 1, + IPV4_IPV6 = 2 + } + + /** Properties of a ControlPlaneEndpointsConfig. */ + interface IControlPlaneEndpointsConfig { + + /** ControlPlaneEndpointsConfig dnsEndpointConfig */ + dnsEndpointConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null); + + /** ControlPlaneEndpointsConfig ipEndpointsConfig */ + ipEndpointsConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null); + } + + /** Represents a ControlPlaneEndpointsConfig. */ + class ControlPlaneEndpointsConfig implements IControlPlaneEndpointsConfig { + + /** + * Constructs a new ControlPlaneEndpointsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.IControlPlaneEndpointsConfig); + + /** ControlPlaneEndpointsConfig dnsEndpointConfig. */ + public dnsEndpointConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null); + + /** ControlPlaneEndpointsConfig ipEndpointsConfig. */ + public ipEndpointsConfig?: (google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null); + + /** + * Creates a new ControlPlaneEndpointsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns ControlPlaneEndpointsConfig instance + */ + public static create(properties?: google.container.v1.IControlPlaneEndpointsConfig): google.container.v1.ControlPlaneEndpointsConfig; + + /** + * Encodes the specified ControlPlaneEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. + * @param message ControlPlaneEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.IControlPlaneEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified ControlPlaneEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. + * @param message ControlPlaneEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.IControlPlaneEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; /** - * Decodes a Fleet message from the specified reader or buffer. + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer. * @param reader Reader or buffer to decode from * @param [length] Message length if known beforehand - * @returns Fleet + * @returns ControlPlaneEndpointsConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.Fleet; + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig; /** - * Decodes a Fleet message from the specified reader or buffer, length delimited. + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer, length delimited. * @param reader Reader or buffer to decode from - * @returns Fleet + * @returns ControlPlaneEndpointsConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.Fleet; + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig; /** - * Verifies a Fleet message. + * Verifies a ControlPlaneEndpointsConfig message. * @param message Plain object to verify * @returns `null` if valid, otherwise the reason why it is not */ public static verify(message: { [k: string]: any }): (string|null); /** - * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * Creates a ControlPlaneEndpointsConfig message from a plain object. Also converts values to their respective internal types. * @param object Plain object - * @returns Fleet + * @returns ControlPlaneEndpointsConfig */ - public static fromObject(object: { [k: string]: any }): google.container.v1.Fleet; + public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig; /** - * Creates a plain object from a Fleet message. Also converts values to other types if specified. - * @param message Fleet + * Creates a plain object from a ControlPlaneEndpointsConfig message. Also converts values to other types if specified. + * @param message ControlPlaneEndpointsConfig * @param [options] Conversion options * @returns Plain object */ - public static toObject(message: google.container.v1.Fleet, options?: $protobuf.IConversionOptions): { [k: string]: any }; + public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; /** - * Converts this Fleet to JSON. + * Converts this ControlPlaneEndpointsConfig to JSON. * @returns JSON object */ public toJSON(): { [k: string]: any }; /** - * Gets the default type url for Fleet + * Gets the default type url for ControlPlaneEndpointsConfig * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns The default type url */ public static getTypeUrl(typeUrlPrefix?: string): string; } - /** StackType enum. */ - enum StackType { - STACK_TYPE_UNSPECIFIED = 0, - IPV4 = 1, - IPV4_IPV6 = 2 + namespace ControlPlaneEndpointsConfig { + + /** Properties of a DNSEndpointConfig. */ + interface IDNSEndpointConfig { + + /** DNSEndpointConfig endpoint */ + endpoint?: (string|null); + + /** DNSEndpointConfig allowExternalTraffic */ + allowExternalTraffic?: (boolean|null); + } + + /** Represents a DNSEndpointConfig. */ + class DNSEndpointConfig implements IDNSEndpointConfig { + + /** + * Constructs a new DNSEndpointConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig); + + /** DNSEndpointConfig endpoint. */ + public endpoint: string; + + /** DNSEndpointConfig allowExternalTraffic. */ + public allowExternalTraffic?: (boolean|null); + + /** DNSEndpointConfig _allowExternalTraffic. */ + public _allowExternalTraffic?: "allowExternalTraffic"; + + /** + * Creates a new DNSEndpointConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns DNSEndpointConfig instance + */ + public static create(properties?: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Encodes the specified DNSEndpointConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @param message DNSEndpointConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified DNSEndpointConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @param message DNSEndpointConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Verifies a DNSEndpointConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a DNSEndpointConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns DNSEndpointConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig; + + /** + * Creates a plain object from a DNSEndpointConfig message. Also converts values to other types if specified. + * @param message DNSEndpointConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this DNSEndpointConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for DNSEndpointConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + + /** Properties of a IPEndpointsConfig. */ + interface IIPEndpointsConfig { + + /** IPEndpointsConfig enabled */ + enabled?: (boolean|null); + + /** IPEndpointsConfig enablePublicEndpoint */ + enablePublicEndpoint?: (boolean|null); + + /** IPEndpointsConfig globalAccess */ + globalAccess?: (boolean|null); + + /** IPEndpointsConfig authorizedNetworksConfig */ + authorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** IPEndpointsConfig publicEndpoint */ + publicEndpoint?: (string|null); + + /** IPEndpointsConfig privateEndpoint */ + privateEndpoint?: (string|null); + + /** IPEndpointsConfig privateEndpointSubnetwork */ + privateEndpointSubnetwork?: (string|null); + } + + /** Represents a IPEndpointsConfig. */ + class IPEndpointsConfig implements IIPEndpointsConfig { + + /** + * Constructs a new IPEndpointsConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig); + + /** IPEndpointsConfig enabled. */ + public enabled?: (boolean|null); + + /** IPEndpointsConfig enablePublicEndpoint. */ + public enablePublicEndpoint?: (boolean|null); + + /** IPEndpointsConfig globalAccess. */ + public globalAccess?: (boolean|null); + + /** IPEndpointsConfig authorizedNetworksConfig. */ + public authorizedNetworksConfig?: (google.container.v1.IMasterAuthorizedNetworksConfig|null); + + /** IPEndpointsConfig publicEndpoint. */ + public publicEndpoint: string; + + /** IPEndpointsConfig privateEndpoint. */ + public privateEndpoint: string; + + /** IPEndpointsConfig privateEndpointSubnetwork. */ + public privateEndpointSubnetwork: string; + + /** IPEndpointsConfig _enabled. */ + public _enabled?: "enabled"; + + /** IPEndpointsConfig _enablePublicEndpoint. */ + public _enablePublicEndpoint?: "enablePublicEndpoint"; + + /** IPEndpointsConfig _globalAccess. */ + public _globalAccess?: "globalAccess"; + + /** + * Creates a new IPEndpointsConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns IPEndpointsConfig instance + */ + public static create(properties?: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Encodes the specified IPEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @param message IPEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified IPEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @param message IPEndpointsConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Verifies a IPEndpointsConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a IPEndpointsConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns IPEndpointsConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig; + + /** + * Creates a plain object from a IPEndpointsConfig message. Also converts values to other types if specified. + * @param message IPEndpointsConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this IPEndpointsConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for IPEndpointsConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } } /** IPv6AccessType enum. */ @@ -22704,6 +23763,106 @@ export namespace google { } } + /** Properties of a SecretManagerConfig. */ + interface ISecretManagerConfig { + + /** SecretManagerConfig enabled */ + enabled?: (boolean|null); + } + + /** Represents a SecretManagerConfig. */ + class SecretManagerConfig implements ISecretManagerConfig { + + /** + * Constructs a new SecretManagerConfig. + * @param [properties] Properties to set + */ + constructor(properties?: google.container.v1.ISecretManagerConfig); + + /** SecretManagerConfig enabled. */ + public enabled?: (boolean|null); + + /** SecretManagerConfig _enabled. */ + public _enabled?: "enabled"; + + /** + * Creates a new SecretManagerConfig instance using the specified properties. + * @param [properties] Properties to set + * @returns SecretManagerConfig instance + */ + public static create(properties?: google.container.v1.ISecretManagerConfig): google.container.v1.SecretManagerConfig; + + /** + * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @param message SecretManagerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encode(message: google.container.v1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @param message SecretManagerConfig message or plain object to encode + * @param [writer] Writer to encode to + * @returns Writer + */ + public static encodeDelimited(message: google.container.v1.ISecretManagerConfig, writer?: $protobuf.Writer): $protobuf.Writer; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer. + * @param reader Reader or buffer to decode from + * @param [length] Message length if known beforehand + * @returns SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decode(reader: ($protobuf.Reader|Uint8Array), length?: number): google.container.v1.SecretManagerConfig; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. + * @param reader Reader or buffer to decode from + * @returns SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + public static decodeDelimited(reader: ($protobuf.Reader|Uint8Array)): google.container.v1.SecretManagerConfig; + + /** + * Verifies a SecretManagerConfig message. + * @param message Plain object to verify + * @returns `null` if valid, otherwise the reason why it is not + */ + public static verify(message: { [k: string]: any }): (string|null); + + /** + * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. + * @param object Plain object + * @returns SecretManagerConfig + */ + public static fromObject(object: { [k: string]: any }): google.container.v1.SecretManagerConfig; + + /** + * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. + * @param message SecretManagerConfig + * @param [options] Conversion options + * @returns Plain object + */ + public static toObject(message: google.container.v1.SecretManagerConfig, options?: $protobuf.IConversionOptions): { [k: string]: any }; + + /** + * Converts this SecretManagerConfig to JSON. + * @returns JSON object + */ + public toJSON(): { [k: string]: any }; + + /** + * Gets the default type url for SecretManagerConfig + * @param [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns The default type url + */ + public static getTypeUrl(typeUrlPrefix?: string): string; + } + /** Properties of a SecondaryBootDisk. */ interface ISecondaryBootDisk { diff --git a/packages/google-container/protos/protos.js b/packages/google-container/protos/protos.js index 79f3498c277..6e8d336035f 100644 --- a/packages/google-container/protos/protos.js +++ b/packages/google-container/protos/protos.js @@ -2444,7 +2444,9 @@ * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodeConfig resourceManagerTags * @property {boolean|null} [enableConfidentialStorage] NodeConfig enableConfidentialStorage * @property {Array.|null} [secondaryBootDisks] NodeConfig secondaryBootDisks + * @property {Array.|null} [storagePools] NodeConfig storagePools * @property {google.container.v1.ISecondaryBootDiskUpdateStrategy|null} [secondaryBootDiskUpdateStrategy] NodeConfig secondaryBootDiskUpdateStrategy + * @property {google.container.v1.NodeConfig.EffectiveCgroupMode|null} [effectiveCgroupMode] NodeConfig effectiveCgroupMode */ /** @@ -2464,6 +2466,7 @@ this.taints = []; this.resourceLabels = {}; this.secondaryBootDisks = []; + this.storagePools = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -2774,6 +2777,14 @@ */ NodeConfig.prototype.secondaryBootDisks = $util.emptyArray; + /** + * NodeConfig storagePools. + * @member {Array.} storagePools + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.storagePools = $util.emptyArray; + /** * NodeConfig secondaryBootDiskUpdateStrategy. * @member {google.container.v1.ISecondaryBootDiskUpdateStrategy|null|undefined} secondaryBootDiskUpdateStrategy @@ -2782,6 +2793,14 @@ */ NodeConfig.prototype.secondaryBootDiskUpdateStrategy = null; + /** + * NodeConfig effectiveCgroupMode. + * @member {google.container.v1.NodeConfig.EffectiveCgroupMode} effectiveCgroupMode + * @memberof google.container.v1.NodeConfig + * @instance + */ + NodeConfig.prototype.effectiveCgroupMode = 0; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -2915,8 +2934,13 @@ if (message.secondaryBootDisks != null && message.secondaryBootDisks.length) for (var i = 0; i < message.secondaryBootDisks.length; ++i) $root.google.container.v1.SecondaryBootDisk.encode(message.secondaryBootDisks[i], writer.uint32(/* id 48, wireType 2 =*/386).fork()).ldelim(); + if (message.storagePools != null && message.storagePools.length) + for (var i = 0; i < message.storagePools.length; ++i) + writer.uint32(/* id 49, wireType 2 =*/394).string(message.storagePools[i]); if (message.secondaryBootDiskUpdateStrategy != null && Object.hasOwnProperty.call(message, "secondaryBootDiskUpdateStrategy")) $root.google.container.v1.SecondaryBootDiskUpdateStrategy.encode(message.secondaryBootDiskUpdateStrategy, writer.uint32(/* id 50, wireType 2 =*/402).fork()).ldelim(); + if (message.effectiveCgroupMode != null && Object.hasOwnProperty.call(message, "effectiveCgroupMode")) + writer.uint32(/* id 55, wireType 0 =*/440).int32(message.effectiveCgroupMode); return writer; }; @@ -3170,10 +3194,20 @@ message.secondaryBootDisks.push($root.google.container.v1.SecondaryBootDisk.decode(reader, reader.uint32())); break; } + case 49: { + if (!(message.storagePools && message.storagePools.length)) + message.storagePools = []; + message.storagePools.push(reader.string()); + break; + } case 50: { message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.decode(reader, reader.uint32()); break; } + case 55: { + message.effectiveCgroupMode = reader.int32(); + break; + } default: reader.skipType(tag & 7); break; @@ -3404,6 +3438,13 @@ return "secondaryBootDisks." + error; } } + if (message.storagePools != null && message.hasOwnProperty("storagePools")) { + if (!Array.isArray(message.storagePools)) + return "storagePools: array expected"; + for (var i = 0; i < message.storagePools.length; ++i) + if (!$util.isString(message.storagePools[i])) + return "storagePools: string[] expected"; + } if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { properties._secondaryBootDiskUpdateStrategy = 1; { @@ -3412,6 +3453,15 @@ return "secondaryBootDiskUpdateStrategy." + error; } } + if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) + switch (message.effectiveCgroupMode) { + default: + return "effectiveCgroupMode: enum value expected"; + case 0: + case 1: + case 2: + break; + } return null; }; @@ -3606,11 +3656,38 @@ message.secondaryBootDisks[i] = $root.google.container.v1.SecondaryBootDisk.fromObject(object.secondaryBootDisks[i]); } } + if (object.storagePools) { + if (!Array.isArray(object.storagePools)) + throw TypeError(".google.container.v1.NodeConfig.storagePools: array expected"); + message.storagePools = []; + for (var i = 0; i < object.storagePools.length; ++i) + message.storagePools[i] = String(object.storagePools[i]); + } if (object.secondaryBootDiskUpdateStrategy != null) { if (typeof object.secondaryBootDiskUpdateStrategy !== "object") throw TypeError(".google.container.v1.NodeConfig.secondaryBootDiskUpdateStrategy: object expected"); message.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.fromObject(object.secondaryBootDiskUpdateStrategy); } + switch (object.effectiveCgroupMode) { + default: + if (typeof object.effectiveCgroupMode === "number") { + message.effectiveCgroupMode = object.effectiveCgroupMode; + break; + } + break; + case "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": + case 0: + message.effectiveCgroupMode = 0; + break; + case "EFFECTIVE_CGROUP_MODE_V1": + case 1: + message.effectiveCgroupMode = 1; + break; + case "EFFECTIVE_CGROUP_MODE_V2": + case 2: + message.effectiveCgroupMode = 2; + break; + } return message; }; @@ -3633,6 +3710,7 @@ object.accelerators = []; object.taints = []; object.secondaryBootDisks = []; + object.storagePools = []; } if (options.objects || options.defaults) { object.metadata = {}; @@ -3669,6 +3747,7 @@ object.containerdConfig = null; object.resourceManagerTags = null; object.enableConfidentialStorage = false; + object.effectiveCgroupMode = options.enums === String ? "EFFECTIVE_CGROUP_MODE_UNSPECIFIED" : 0; } if (message.machineType != null && message.hasOwnProperty("machineType")) object.machineType = message.machineType; @@ -3774,11 +3853,18 @@ for (var j = 0; j < message.secondaryBootDisks.length; ++j) object.secondaryBootDisks[j] = $root.google.container.v1.SecondaryBootDisk.toObject(message.secondaryBootDisks[j], options); } + if (message.storagePools && message.storagePools.length) { + object.storagePools = []; + for (var j = 0; j < message.storagePools.length; ++j) + object.storagePools[j] = message.storagePools[j]; + } if (message.secondaryBootDiskUpdateStrategy != null && message.hasOwnProperty("secondaryBootDiskUpdateStrategy")) { object.secondaryBootDiskUpdateStrategy = $root.google.container.v1.SecondaryBootDiskUpdateStrategy.toObject(message.secondaryBootDiskUpdateStrategy, options); if (options.oneofs) object._secondaryBootDiskUpdateStrategy = "secondaryBootDiskUpdateStrategy"; } + if (message.effectiveCgroupMode != null && message.hasOwnProperty("effectiveCgroupMode")) + object.effectiveCgroupMode = options.enums === String ? $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] === undefined ? message.effectiveCgroupMode : $root.google.container.v1.NodeConfig.EffectiveCgroupMode[message.effectiveCgroupMode] : message.effectiveCgroupMode; return object; }; @@ -3808,6 +3894,22 @@ return typeUrlPrefix + "/google.container.v1.NodeConfig"; }; + /** + * EffectiveCgroupMode enum. + * @name google.container.v1.NodeConfig.EffectiveCgroupMode + * @enum {number} + * @property {number} EFFECTIVE_CGROUP_MODE_UNSPECIFIED=0 EFFECTIVE_CGROUP_MODE_UNSPECIFIED value + * @property {number} EFFECTIVE_CGROUP_MODE_V1=1 EFFECTIVE_CGROUP_MODE_V1 value + * @property {number} EFFECTIVE_CGROUP_MODE_V2=2 EFFECTIVE_CGROUP_MODE_V2 value + */ + NodeConfig.EffectiveCgroupMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "EFFECTIVE_CGROUP_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "EFFECTIVE_CGROUP_MODE_V1"] = 1; + values[valuesById[2] = "EFFECTIVE_CGROUP_MODE_V2"] = 2; + return values; + })(); + return NodeConfig; })(); @@ -9511,6 +9613,7 @@ * @property {google.container.v1.IGkeBackupAgentConfig|null} [gkeBackupAgentConfig] AddonsConfig gkeBackupAgentConfig * @property {google.container.v1.IGcsFuseCsiDriverConfig|null} [gcsFuseCsiDriverConfig] AddonsConfig gcsFuseCsiDriverConfig * @property {google.container.v1.IStatefulHAConfig|null} [statefulHaConfig] AddonsConfig statefulHaConfig + * @property {google.container.v1.IParallelstoreCsiDriverConfig|null} [parallelstoreCsiDriverConfig] AddonsConfig parallelstoreCsiDriverConfig * @property {google.container.v1.IRayOperatorConfig|null} [rayOperatorConfig] AddonsConfig rayOperatorConfig */ @@ -9625,6 +9728,14 @@ */ AddonsConfig.prototype.statefulHaConfig = null; + /** + * AddonsConfig parallelstoreCsiDriverConfig. + * @member {google.container.v1.IParallelstoreCsiDriverConfig|null|undefined} parallelstoreCsiDriverConfig + * @memberof google.container.v1.AddonsConfig + * @instance + */ + AddonsConfig.prototype.parallelstoreCsiDriverConfig = null; + /** * AddonsConfig rayOperatorConfig. * @member {google.container.v1.IRayOperatorConfig|null|undefined} rayOperatorConfig @@ -9681,6 +9792,8 @@ $root.google.container.v1.GcsFuseCsiDriverConfig.encode(message.gcsFuseCsiDriverConfig, writer.uint32(/* id 17, wireType 2 =*/138).fork()).ldelim(); if (message.statefulHaConfig != null && Object.hasOwnProperty.call(message, "statefulHaConfig")) $root.google.container.v1.StatefulHAConfig.encode(message.statefulHaConfig, writer.uint32(/* id 18, wireType 2 =*/146).fork()).ldelim(); + if (message.parallelstoreCsiDriverConfig != null && Object.hasOwnProperty.call(message, "parallelstoreCsiDriverConfig")) + $root.google.container.v1.ParallelstoreCsiDriverConfig.encode(message.parallelstoreCsiDriverConfig, writer.uint32(/* id 19, wireType 2 =*/154).fork()).ldelim(); if (message.rayOperatorConfig != null && Object.hasOwnProperty.call(message, "rayOperatorConfig")) $root.google.container.v1.RayOperatorConfig.encode(message.rayOperatorConfig, writer.uint32(/* id 21, wireType 2 =*/170).fork()).ldelim(); return writer; @@ -9765,6 +9878,10 @@ message.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.decode(reader, reader.uint32()); break; } + case 19: { + message.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.decode(reader, reader.uint32()); + break; + } case 21: { message.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.decode(reader, reader.uint32()); break; @@ -9864,6 +9981,11 @@ if (error) return "statefulHaConfig." + error; } + if (message.parallelstoreCsiDriverConfig != null && message.hasOwnProperty("parallelstoreCsiDriverConfig")) { + var error = $root.google.container.v1.ParallelstoreCsiDriverConfig.verify(message.parallelstoreCsiDriverConfig); + if (error) + return "parallelstoreCsiDriverConfig." + error; + } if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) { var error = $root.google.container.v1.RayOperatorConfig.verify(message.rayOperatorConfig); if (error) @@ -9944,6 +10066,11 @@ throw TypeError(".google.container.v1.AddonsConfig.statefulHaConfig: object expected"); message.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.fromObject(object.statefulHaConfig); } + if (object.parallelstoreCsiDriverConfig != null) { + if (typeof object.parallelstoreCsiDriverConfig !== "object") + throw TypeError(".google.container.v1.AddonsConfig.parallelstoreCsiDriverConfig: object expected"); + message.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.fromObject(object.parallelstoreCsiDriverConfig); + } if (object.rayOperatorConfig != null) { if (typeof object.rayOperatorConfig !== "object") throw TypeError(".google.container.v1.AddonsConfig.rayOperatorConfig: object expected"); @@ -9978,6 +10105,7 @@ object.gkeBackupAgentConfig = null; object.gcsFuseCsiDriverConfig = null; object.statefulHaConfig = null; + object.parallelstoreCsiDriverConfig = null; object.rayOperatorConfig = null; } if (message.httpLoadBalancing != null && message.hasOwnProperty("httpLoadBalancing")) @@ -10004,6 +10132,8 @@ object.gcsFuseCsiDriverConfig = $root.google.container.v1.GcsFuseCsiDriverConfig.toObject(message.gcsFuseCsiDriverConfig, options); if (message.statefulHaConfig != null && message.hasOwnProperty("statefulHaConfig")) object.statefulHaConfig = $root.google.container.v1.StatefulHAConfig.toObject(message.statefulHaConfig, options); + if (message.parallelstoreCsiDriverConfig != null && message.hasOwnProperty("parallelstoreCsiDriverConfig")) + object.parallelstoreCsiDriverConfig = $root.google.container.v1.ParallelstoreCsiDriverConfig.toObject(message.parallelstoreCsiDriverConfig, options); if (message.rayOperatorConfig != null && message.hasOwnProperty("rayOperatorConfig")) object.rayOperatorConfig = $root.google.container.v1.RayOperatorConfig.toObject(message.rayOperatorConfig, options); return object; @@ -12932,6 +13062,209 @@ return GcsFuseCsiDriverConfig; })(); + v1.ParallelstoreCsiDriverConfig = (function() { + + /** + * Properties of a ParallelstoreCsiDriverConfig. + * @memberof google.container.v1 + * @interface IParallelstoreCsiDriverConfig + * @property {boolean|null} [enabled] ParallelstoreCsiDriverConfig enabled + */ + + /** + * Constructs a new ParallelstoreCsiDriverConfig. + * @memberof google.container.v1 + * @classdesc Represents a ParallelstoreCsiDriverConfig. + * @implements IParallelstoreCsiDriverConfig + * @constructor + * @param {google.container.v1.IParallelstoreCsiDriverConfig=} [properties] Properties to set + */ + function ParallelstoreCsiDriverConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ParallelstoreCsiDriverConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @instance + */ + ParallelstoreCsiDriverConfig.prototype.enabled = false; + + /** + * Creates a new ParallelstoreCsiDriverConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.IParallelstoreCsiDriverConfig=} [properties] Properties to set + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig instance + */ + ParallelstoreCsiDriverConfig.create = function create(properties) { + return new ParallelstoreCsiDriverConfig(properties); + }; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.IParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParallelstoreCsiDriverConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ParallelstoreCsiDriverConfig message, length delimited. Does not implicitly {@link google.container.v1.ParallelstoreCsiDriverConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.IParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ParallelstoreCsiDriverConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParallelstoreCsiDriverConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ParallelstoreCsiDriverConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ParallelstoreCsiDriverConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ParallelstoreCsiDriverConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ParallelstoreCsiDriverConfig message. + * @function verify + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ParallelstoreCsiDriverConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ParallelstoreCsiDriverConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ParallelstoreCsiDriverConfig} ParallelstoreCsiDriverConfig + */ + ParallelstoreCsiDriverConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ParallelstoreCsiDriverConfig) + return object; + var message = new $root.google.container.v1.ParallelstoreCsiDriverConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ParallelstoreCsiDriverConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {google.container.v1.ParallelstoreCsiDriverConfig} message ParallelstoreCsiDriverConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ParallelstoreCsiDriverConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ParallelstoreCsiDriverConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @instance + * @returns {Object.} JSON object + */ + ParallelstoreCsiDriverConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ParallelstoreCsiDriverConfig + * @function getTypeUrl + * @memberof google.container.v1.ParallelstoreCsiDriverConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ParallelstoreCsiDriverConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ParallelstoreCsiDriverConfig"; + }; + + return ParallelstoreCsiDriverConfig; + })(); + v1.RayOperatorConfig = (function() { /** @@ -13607,6 +13940,7 @@ * @property {boolean|null} [enabled] MasterAuthorizedNetworksConfig enabled * @property {Array.|null} [cidrBlocks] MasterAuthorizedNetworksConfig cidrBlocks * @property {boolean|null} [gcpPublicCidrsAccessEnabled] MasterAuthorizedNetworksConfig gcpPublicCidrsAccessEnabled + * @property {boolean|null} [privateEndpointEnforcementEnabled] MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled */ /** @@ -13649,6 +13983,14 @@ */ MasterAuthorizedNetworksConfig.prototype.gcpPublicCidrsAccessEnabled = null; + /** + * MasterAuthorizedNetworksConfig privateEndpointEnforcementEnabled. + * @member {boolean|null|undefined} privateEndpointEnforcementEnabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + MasterAuthorizedNetworksConfig.prototype.privateEndpointEnforcementEnabled = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -13663,6 +14005,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * MasterAuthorizedNetworksConfig _privateEndpointEnforcementEnabled. + * @member {"privateEndpointEnforcementEnabled"|undefined} _privateEndpointEnforcementEnabled + * @memberof google.container.v1.MasterAuthorizedNetworksConfig + * @instance + */ + Object.defineProperty(MasterAuthorizedNetworksConfig.prototype, "_privateEndpointEnforcementEnabled", { + get: $util.oneOfGetter($oneOfFields = ["privateEndpointEnforcementEnabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new MasterAuthorizedNetworksConfig instance using the specified properties. * @function create @@ -13694,6 +14047,8 @@ $root.google.container.v1.MasterAuthorizedNetworksConfig.CidrBlock.encode(message.cidrBlocks[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); if (message.gcpPublicCidrsAccessEnabled != null && Object.hasOwnProperty.call(message, "gcpPublicCidrsAccessEnabled")) writer.uint32(/* id 3, wireType 0 =*/24).bool(message.gcpPublicCidrsAccessEnabled); + if (message.privateEndpointEnforcementEnabled != null && Object.hasOwnProperty.call(message, "privateEndpointEnforcementEnabled")) + writer.uint32(/* id 5, wireType 0 =*/40).bool(message.privateEndpointEnforcementEnabled); return writer; }; @@ -13742,6 +14097,10 @@ message.gcpPublicCidrsAccessEnabled = reader.bool(); break; } + case 5: { + message.privateEndpointEnforcementEnabled = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -13795,6 +14154,11 @@ if (typeof message.gcpPublicCidrsAccessEnabled !== "boolean") return "gcpPublicCidrsAccessEnabled: boolean expected"; } + if (message.privateEndpointEnforcementEnabled != null && message.hasOwnProperty("privateEndpointEnforcementEnabled")) { + properties._privateEndpointEnforcementEnabled = 1; + if (typeof message.privateEndpointEnforcementEnabled !== "boolean") + return "privateEndpointEnforcementEnabled: boolean expected"; + } return null; }; @@ -13824,6 +14188,8 @@ } if (object.gcpPublicCidrsAccessEnabled != null) message.gcpPublicCidrsAccessEnabled = Boolean(object.gcpPublicCidrsAccessEnabled); + if (object.privateEndpointEnforcementEnabled != null) + message.privateEndpointEnforcementEnabled = Boolean(object.privateEndpointEnforcementEnabled); return message; }; @@ -13856,6 +14222,11 @@ if (options.oneofs) object._gcpPublicCidrsAccessEnabled = "gcpPublicCidrsAccessEnabled"; } + if (message.privateEndpointEnforcementEnabled != null && message.hasOwnProperty("privateEndpointEnforcementEnabled")) { + object.privateEndpointEnforcementEnabled = message.privateEndpointEnforcementEnabled; + if (options.oneofs) + object._privateEndpointEnforcementEnabled = "privateEndpointEnforcementEnabled"; + } return object; }; @@ -15818,10 +16189,15 @@ * @property {string|null} [etag] Cluster etag * @property {google.container.v1.IFleet|null} [fleet] Cluster fleet * @property {google.container.v1.ISecurityPostureConfig|null} [securityPostureConfig] Cluster securityPostureConfig + * @property {google.container.v1.IControlPlaneEndpointsConfig|null} [controlPlaneEndpointsConfig] Cluster controlPlaneEndpointsConfig * @property {google.container.v1.IK8sBetaAPIConfig|null} [enableK8sBetaApis] Cluster enableK8sBetaApis * @property {google.container.v1.IEnterpriseConfig|null} [enterpriseConfig] Cluster enterpriseConfig + * @property {google.container.v1.ISecretManagerConfig|null} [secretManagerConfig] Cluster secretManagerConfig + * @property {google.container.v1.ICompliancePostureConfig|null} [compliancePostureConfig] Cluster compliancePostureConfig * @property {boolean|null} [satisfiesPzs] Cluster satisfiesPzs * @property {boolean|null} [satisfiesPzi] Cluster satisfiesPzi + * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] Cluster userManagedKeysConfig + * @property {google.container.v1.IRBACBindingConfig|null} [rbacBindingConfig] Cluster rbacBindingConfig */ /** @@ -16364,6 +16740,14 @@ */ Cluster.prototype.securityPostureConfig = null; + /** + * Cluster controlPlaneEndpointsConfig. + * @member {google.container.v1.IControlPlaneEndpointsConfig|null|undefined} controlPlaneEndpointsConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.controlPlaneEndpointsConfig = null; + /** * Cluster enableK8sBetaApis. * @member {google.container.v1.IK8sBetaAPIConfig|null|undefined} enableK8sBetaApis @@ -16380,6 +16764,22 @@ */ Cluster.prototype.enterpriseConfig = null; + /** + * Cluster secretManagerConfig. + * @member {google.container.v1.ISecretManagerConfig|null|undefined} secretManagerConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.secretManagerConfig = null; + + /** + * Cluster compliancePostureConfig. + * @member {google.container.v1.ICompliancePostureConfig|null|undefined} compliancePostureConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.compliancePostureConfig = null; + /** * Cluster satisfiesPzs. * @member {boolean|null|undefined} satisfiesPzs @@ -16396,6 +16796,22 @@ */ Cluster.prototype.satisfiesPzi = null; + /** + * Cluster userManagedKeysConfig. + * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} userManagedKeysConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.userManagedKeysConfig = null; + + /** + * Cluster rbacBindingConfig. + * @member {google.container.v1.IRBACBindingConfig|null|undefined} rbacBindingConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Cluster.prototype.rbacBindingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -16432,6 +16848,28 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * Cluster _userManagedKeysConfig. + * @member {"userManagedKeysConfig"|undefined} _userManagedKeysConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_userManagedKeysConfig", { + get: $util.oneOfGetter($oneOfFields = ["userManagedKeysConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Cluster _rbacBindingConfig. + * @member {"rbacBindingConfig"|undefined} _rbacBindingConfig + * @memberof google.container.v1.Cluster + * @instance + */ + Object.defineProperty(Cluster.prototype, "_rbacBindingConfig", { + get: $util.oneOfGetter($oneOfFields = ["rbacBindingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new Cluster instance using the specified properties. * @function create @@ -16593,12 +17031,22 @@ $root.google.container.v1.K8sBetaAPIConfig.encode(message.enableK8sBetaApis, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); if (message.securityPostureConfig != null && Object.hasOwnProperty.call(message, "securityPostureConfig")) $root.google.container.v1.SecurityPostureConfig.encode(message.securityPostureConfig, writer.uint32(/* id 145, wireType 2 =*/1162).fork()).ldelim(); + if (message.controlPlaneEndpointsConfig != null && Object.hasOwnProperty.call(message, "controlPlaneEndpointsConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.encode(message.controlPlaneEndpointsConfig, writer.uint32(/* id 146, wireType 2 =*/1170).fork()).ldelim(); if (message.enterpriseConfig != null && Object.hasOwnProperty.call(message, "enterpriseConfig")) $root.google.container.v1.EnterpriseConfig.encode(message.enterpriseConfig, writer.uint32(/* id 149, wireType 2 =*/1194).fork()).ldelim(); + if (message.secretManagerConfig != null && Object.hasOwnProperty.call(message, "secretManagerConfig")) + $root.google.container.v1.SecretManagerConfig.encode(message.secretManagerConfig, writer.uint32(/* id 150, wireType 2 =*/1202).fork()).ldelim(); + if (message.compliancePostureConfig != null && Object.hasOwnProperty.call(message, "compliancePostureConfig")) + $root.google.container.v1.CompliancePostureConfig.encode(message.compliancePostureConfig, writer.uint32(/* id 151, wireType 2 =*/1210).fork()).ldelim(); if (message.satisfiesPzs != null && Object.hasOwnProperty.call(message, "satisfiesPzs")) writer.uint32(/* id 152, wireType 0 =*/1216).bool(message.satisfiesPzs); if (message.satisfiesPzi != null && Object.hasOwnProperty.call(message, "satisfiesPzi")) writer.uint32(/* id 153, wireType 0 =*/1224).bool(message.satisfiesPzi); + if (message.userManagedKeysConfig != null && Object.hasOwnProperty.call(message, "userManagedKeysConfig")) + $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 154, wireType 2 =*/1234).fork()).ldelim(); + if (message.rbacBindingConfig != null && Object.hasOwnProperty.call(message, "rbacBindingConfig")) + $root.google.container.v1.RBACBindingConfig.encode(message.rbacBindingConfig, writer.uint32(/* id 156, wireType 2 =*/1250).fork()).ldelim(); return writer; }; @@ -16920,6 +17368,10 @@ message.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.decode(reader, reader.uint32()); break; } + case 146: { + message.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.decode(reader, reader.uint32()); + break; + } case 143: { message.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.decode(reader, reader.uint32()); break; @@ -16928,6 +17380,14 @@ message.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.decode(reader, reader.uint32()); break; } + case 150: { + message.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.decode(reader, reader.uint32()); + break; + } + case 151: { + message.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.decode(reader, reader.uint32()); + break; + } case 152: { message.satisfiesPzs = reader.bool(); break; @@ -16936,6 +17396,14 @@ message.satisfiesPzi = reader.bool(); break; } + case 154: { + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); + break; + } + case 156: { + message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -17269,6 +17737,11 @@ if (error) return "securityPostureConfig." + error; } + if (message.controlPlaneEndpointsConfig != null && message.hasOwnProperty("controlPlaneEndpointsConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.verify(message.controlPlaneEndpointsConfig); + if (error) + return "controlPlaneEndpointsConfig." + error; + } if (message.enableK8sBetaApis != null && message.hasOwnProperty("enableK8sBetaApis")) { var error = $root.google.container.v1.K8sBetaAPIConfig.verify(message.enableK8sBetaApis); if (error) @@ -17279,6 +17752,16 @@ if (error) return "enterpriseConfig." + error; } + if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) { + var error = $root.google.container.v1.SecretManagerConfig.verify(message.secretManagerConfig); + if (error) + return "secretManagerConfig." + error; + } + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) { + var error = $root.google.container.v1.CompliancePostureConfig.verify(message.compliancePostureConfig); + if (error) + return "compliancePostureConfig." + error; + } if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { properties._satisfiesPzs = 1; if (typeof message.satisfiesPzs !== "boolean") @@ -17289,6 +17772,22 @@ if (typeof message.satisfiesPzi !== "boolean") return "satisfiesPzi: boolean expected"; } + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { + properties._userManagedKeysConfig = 1; + { + var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.userManagedKeysConfig); + if (error) + return "userManagedKeysConfig." + error; + } + } + if (message.rbacBindingConfig != null && message.hasOwnProperty("rbacBindingConfig")) { + properties._rbacBindingConfig = 1; + { + var error = $root.google.container.v1.RBACBindingConfig.verify(message.rbacBindingConfig); + if (error) + return "rbacBindingConfig." + error; + } + } return null; }; @@ -17595,6 +18094,11 @@ throw TypeError(".google.container.v1.Cluster.securityPostureConfig: object expected"); message.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.fromObject(object.securityPostureConfig); } + if (object.controlPlaneEndpointsConfig != null) { + if (typeof object.controlPlaneEndpointsConfig !== "object") + throw TypeError(".google.container.v1.Cluster.controlPlaneEndpointsConfig: object expected"); + message.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.fromObject(object.controlPlaneEndpointsConfig); + } if (object.enableK8sBetaApis != null) { if (typeof object.enableK8sBetaApis !== "object") throw TypeError(".google.container.v1.Cluster.enableK8sBetaApis: object expected"); @@ -17605,10 +18109,30 @@ throw TypeError(".google.container.v1.Cluster.enterpriseConfig: object expected"); message.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.fromObject(object.enterpriseConfig); } + if (object.secretManagerConfig != null) { + if (typeof object.secretManagerConfig !== "object") + throw TypeError(".google.container.v1.Cluster.secretManagerConfig: object expected"); + message.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.fromObject(object.secretManagerConfig); + } + if (object.compliancePostureConfig != null) { + if (typeof object.compliancePostureConfig !== "object") + throw TypeError(".google.container.v1.Cluster.compliancePostureConfig: object expected"); + message.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.fromObject(object.compliancePostureConfig); + } if (object.satisfiesPzs != null) message.satisfiesPzs = Boolean(object.satisfiesPzs); if (object.satisfiesPzi != null) message.satisfiesPzi = Boolean(object.satisfiesPzi); + if (object.userManagedKeysConfig != null) { + if (typeof object.userManagedKeysConfig !== "object") + throw TypeError(".google.container.v1.Cluster.userManagedKeysConfig: object expected"); + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.userManagedKeysConfig); + } + if (object.rbacBindingConfig != null) { + if (typeof object.rbacBindingConfig !== "object") + throw TypeError(".google.container.v1.Cluster.rbacBindingConfig: object expected"); + message.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.rbacBindingConfig); + } return message; }; @@ -17694,7 +18218,10 @@ object.fleet = null; object.enableK8sBetaApis = null; object.securityPostureConfig = null; + object.controlPlaneEndpointsConfig = null; object.enterpriseConfig = null; + object.secretManagerConfig = null; + object.compliancePostureConfig = null; } if (message.name != null && message.hasOwnProperty("name")) object.name = message.name; @@ -17847,8 +18374,14 @@ object.enableK8sBetaApis = $root.google.container.v1.K8sBetaAPIConfig.toObject(message.enableK8sBetaApis, options); if (message.securityPostureConfig != null && message.hasOwnProperty("securityPostureConfig")) object.securityPostureConfig = $root.google.container.v1.SecurityPostureConfig.toObject(message.securityPostureConfig, options); + if (message.controlPlaneEndpointsConfig != null && message.hasOwnProperty("controlPlaneEndpointsConfig")) + object.controlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.toObject(message.controlPlaneEndpointsConfig, options); if (message.enterpriseConfig != null && message.hasOwnProperty("enterpriseConfig")) object.enterpriseConfig = $root.google.container.v1.EnterpriseConfig.toObject(message.enterpriseConfig, options); + if (message.secretManagerConfig != null && message.hasOwnProperty("secretManagerConfig")) + object.secretManagerConfig = $root.google.container.v1.SecretManagerConfig.toObject(message.secretManagerConfig, options); + if (message.compliancePostureConfig != null && message.hasOwnProperty("compliancePostureConfig")) + object.compliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.toObject(message.compliancePostureConfig, options); if (message.satisfiesPzs != null && message.hasOwnProperty("satisfiesPzs")) { object.satisfiesPzs = message.satisfiesPzs; if (options.oneofs) @@ -17859,6 +18392,16 @@ if (options.oneofs) object._satisfiesPzi = "satisfiesPzi"; } + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { + object.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.userManagedKeysConfig, options); + if (options.oneofs) + object._userManagedKeysConfig = "userManagedKeysConfig"; + } + if (message.rbacBindingConfig != null && message.hasOwnProperty("rbacBindingConfig")) { + object.rbacBindingConfig = $root.google.container.v1.RBACBindingConfig.toObject(message.rbacBindingConfig, options); + if (options.oneofs) + object._rbacBindingConfig = "rbacBindingConfig"; + } return object; }; @@ -17915,25 +18458,25 @@ return Cluster; })(); - v1.K8sBetaAPIConfig = (function() { + v1.RBACBindingConfig = (function() { /** - * Properties of a K8sBetaAPIConfig. + * Properties of a RBACBindingConfig. * @memberof google.container.v1 - * @interface IK8sBetaAPIConfig - * @property {Array.|null} [enabledApis] K8sBetaAPIConfig enabledApis + * @interface IRBACBindingConfig + * @property {boolean|null} [enableInsecureBindingSystemUnauthenticated] RBACBindingConfig enableInsecureBindingSystemUnauthenticated + * @property {boolean|null} [enableInsecureBindingSystemAuthenticated] RBACBindingConfig enableInsecureBindingSystemAuthenticated */ /** - * Constructs a new K8sBetaAPIConfig. + * Constructs a new RBACBindingConfig. * @memberof google.container.v1 - * @classdesc Represents a K8sBetaAPIConfig. - * @implements IK8sBetaAPIConfig + * @classdesc Represents a RBACBindingConfig. + * @implements IRBACBindingConfig * @constructor - * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set + * @param {google.container.v1.IRBACBindingConfig=} [properties] Properties to set */ - function K8sBetaAPIConfig(properties) { - this.enabledApis = []; + function RBACBindingConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -17941,78 +18484,114 @@ } /** - * K8sBetaAPIConfig enabledApis. - * @member {Array.} enabledApis - * @memberof google.container.v1.K8sBetaAPIConfig + * RBACBindingConfig enableInsecureBindingSystemUnauthenticated. + * @member {boolean|null|undefined} enableInsecureBindingSystemUnauthenticated + * @memberof google.container.v1.RBACBindingConfig * @instance */ - K8sBetaAPIConfig.prototype.enabledApis = $util.emptyArray; + RBACBindingConfig.prototype.enableInsecureBindingSystemUnauthenticated = null; /** - * Creates a new K8sBetaAPIConfig instance using the specified properties. + * RBACBindingConfig enableInsecureBindingSystemAuthenticated. + * @member {boolean|null|undefined} enableInsecureBindingSystemAuthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + RBACBindingConfig.prototype.enableInsecureBindingSystemAuthenticated = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * RBACBindingConfig _enableInsecureBindingSystemUnauthenticated. + * @member {"enableInsecureBindingSystemUnauthenticated"|undefined} _enableInsecureBindingSystemUnauthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + Object.defineProperty(RBACBindingConfig.prototype, "_enableInsecureBindingSystemUnauthenticated", { + get: $util.oneOfGetter($oneOfFields = ["enableInsecureBindingSystemUnauthenticated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * RBACBindingConfig _enableInsecureBindingSystemAuthenticated. + * @member {"enableInsecureBindingSystemAuthenticated"|undefined} _enableInsecureBindingSystemAuthenticated + * @memberof google.container.v1.RBACBindingConfig + * @instance + */ + Object.defineProperty(RBACBindingConfig.prototype, "_enableInsecureBindingSystemAuthenticated", { + get: $util.oneOfGetter($oneOfFields = ["enableInsecureBindingSystemAuthenticated"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new RBACBindingConfig instance using the specified properties. * @function create - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static - * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig instance + * @param {google.container.v1.IRBACBindingConfig=} [properties] Properties to set + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig instance */ - K8sBetaAPIConfig.create = function create(properties) { - return new K8sBetaAPIConfig(properties); + RBACBindingConfig.create = function create(properties) { + return new RBACBindingConfig(properties); }; /** - * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * Encodes the specified RBACBindingConfig message. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. * @function encode - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static - * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode + * @param {google.container.v1.IRBACBindingConfig} message RBACBindingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - K8sBetaAPIConfig.encode = function encode(message, writer) { + RBACBindingConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enabledApis != null && message.enabledApis.length) - for (var i = 0; i < message.enabledApis.length; ++i) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.enabledApis[i]); + if (message.enableInsecureBindingSystemUnauthenticated != null && Object.hasOwnProperty.call(message, "enableInsecureBindingSystemUnauthenticated")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enableInsecureBindingSystemUnauthenticated); + if (message.enableInsecureBindingSystemAuthenticated != null && Object.hasOwnProperty.call(message, "enableInsecureBindingSystemAuthenticated")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enableInsecureBindingSystemAuthenticated); return writer; }; /** - * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. + * Encodes the specified RBACBindingConfig message, length delimited. Does not implicitly {@link google.container.v1.RBACBindingConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static - * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode + * @param {google.container.v1.IRBACBindingConfig} message RBACBindingConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - K8sBetaAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { + RBACBindingConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. + * Decodes a RBACBindingConfig message from the specified reader or buffer. * @function decode - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - K8sBetaAPIConfig.decode = function decode(reader, length) { + RBACBindingConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.K8sBetaAPIConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.RBACBindingConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - if (!(message.enabledApis && message.enabledApis.length)) - message.enabledApis = []; - message.enabledApis.push(reader.string()); + message.enableInsecureBindingSystemUnauthenticated = reader.bool(); + break; + } + case 2: { + message.enableInsecureBindingSystemAuthenticated = reader.bool(); break; } default: @@ -18024,135 +18603,147 @@ }; /** - * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. + * Decodes a RBACBindingConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - K8sBetaAPIConfig.decodeDelimited = function decodeDelimited(reader) { + RBACBindingConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a K8sBetaAPIConfig message. + * Verifies a RBACBindingConfig message. * @function verify - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - K8sBetaAPIConfig.verify = function verify(message) { + RBACBindingConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enabledApis != null && message.hasOwnProperty("enabledApis")) { - if (!Array.isArray(message.enabledApis)) - return "enabledApis: array expected"; - for (var i = 0; i < message.enabledApis.length; ++i) - if (!$util.isString(message.enabledApis[i])) - return "enabledApis: string[] expected"; + var properties = {}; + if (message.enableInsecureBindingSystemUnauthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemUnauthenticated")) { + properties._enableInsecureBindingSystemUnauthenticated = 1; + if (typeof message.enableInsecureBindingSystemUnauthenticated !== "boolean") + return "enableInsecureBindingSystemUnauthenticated: boolean expected"; + } + if (message.enableInsecureBindingSystemAuthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemAuthenticated")) { + properties._enableInsecureBindingSystemAuthenticated = 1; + if (typeof message.enableInsecureBindingSystemAuthenticated !== "boolean") + return "enableInsecureBindingSystemAuthenticated: boolean expected"; } return null; }; /** - * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. + * Creates a RBACBindingConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static * @param {Object.} object Plain object - * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig + * @returns {google.container.v1.RBACBindingConfig} RBACBindingConfig */ - K8sBetaAPIConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.K8sBetaAPIConfig) + RBACBindingConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.RBACBindingConfig) return object; - var message = new $root.google.container.v1.K8sBetaAPIConfig(); - if (object.enabledApis) { - if (!Array.isArray(object.enabledApis)) - throw TypeError(".google.container.v1.K8sBetaAPIConfig.enabledApis: array expected"); - message.enabledApis = []; - for (var i = 0; i < object.enabledApis.length; ++i) - message.enabledApis[i] = String(object.enabledApis[i]); - } + var message = new $root.google.container.v1.RBACBindingConfig(); + if (object.enableInsecureBindingSystemUnauthenticated != null) + message.enableInsecureBindingSystemUnauthenticated = Boolean(object.enableInsecureBindingSystemUnauthenticated); + if (object.enableInsecureBindingSystemAuthenticated != null) + message.enableInsecureBindingSystemAuthenticated = Boolean(object.enableInsecureBindingSystemAuthenticated); return message; }; /** - * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. + * Creates a plain object from a RBACBindingConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static - * @param {google.container.v1.K8sBetaAPIConfig} message K8sBetaAPIConfig + * @param {google.container.v1.RBACBindingConfig} message RBACBindingConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - K8sBetaAPIConfig.toObject = function toObject(message, options) { + RBACBindingConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.enabledApis = []; - if (message.enabledApis && message.enabledApis.length) { - object.enabledApis = []; - for (var j = 0; j < message.enabledApis.length; ++j) - object.enabledApis[j] = message.enabledApis[j]; + if (message.enableInsecureBindingSystemUnauthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemUnauthenticated")) { + object.enableInsecureBindingSystemUnauthenticated = message.enableInsecureBindingSystemUnauthenticated; + if (options.oneofs) + object._enableInsecureBindingSystemUnauthenticated = "enableInsecureBindingSystemUnauthenticated"; + } + if (message.enableInsecureBindingSystemAuthenticated != null && message.hasOwnProperty("enableInsecureBindingSystemAuthenticated")) { + object.enableInsecureBindingSystemAuthenticated = message.enableInsecureBindingSystemAuthenticated; + if (options.oneofs) + object._enableInsecureBindingSystemAuthenticated = "enableInsecureBindingSystemAuthenticated"; } return object; }; /** - * Converts this K8sBetaAPIConfig to JSON. + * Converts this RBACBindingConfig to JSON. * @function toJSON - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @instance * @returns {Object.} JSON object */ - K8sBetaAPIConfig.prototype.toJSON = function toJSON() { + RBACBindingConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for K8sBetaAPIConfig + * Gets the default type url for RBACBindingConfig * @function getTypeUrl - * @memberof google.container.v1.K8sBetaAPIConfig + * @memberof google.container.v1.RBACBindingConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - K8sBetaAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + RBACBindingConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.container.v1.K8sBetaAPIConfig"; + return typeUrlPrefix + "/google.container.v1.RBACBindingConfig"; }; - return K8sBetaAPIConfig; + return RBACBindingConfig; })(); - v1.SecurityPostureConfig = (function() { + v1.UserManagedKeysConfig = (function() { /** - * Properties of a SecurityPostureConfig. + * Properties of a UserManagedKeysConfig. * @memberof google.container.v1 - * @interface ISecurityPostureConfig - * @property {google.container.v1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode - * @property {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode + * @interface IUserManagedKeysConfig + * @property {string|null} [clusterCa] UserManagedKeysConfig clusterCa + * @property {string|null} [etcdApiCa] UserManagedKeysConfig etcdApiCa + * @property {string|null} [etcdPeerCa] UserManagedKeysConfig etcdPeerCa + * @property {Array.|null} [serviceAccountSigningKeys] UserManagedKeysConfig serviceAccountSigningKeys + * @property {Array.|null} [serviceAccountVerificationKeys] UserManagedKeysConfig serviceAccountVerificationKeys + * @property {string|null} [aggregationCa] UserManagedKeysConfig aggregationCa + * @property {string|null} [controlPlaneDiskEncryptionKey] UserManagedKeysConfig controlPlaneDiskEncryptionKey + * @property {string|null} [gkeopsEtcdBackupEncryptionKey] UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey */ /** - * Constructs a new SecurityPostureConfig. + * Constructs a new UserManagedKeysConfig. * @memberof google.container.v1 - * @classdesc Represents a SecurityPostureConfig. - * @implements ISecurityPostureConfig + * @classdesc Represents a UserManagedKeysConfig. + * @implements IUserManagedKeysConfig * @constructor - * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set + * @param {google.container.v1.IUserManagedKeysConfig=} [properties] Properties to set */ - function SecurityPostureConfig(properties) { + function UserManagedKeysConfig(properties) { + this.serviceAccountSigningKeys = []; + this.serviceAccountVerificationKeys = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18160,114 +18751,179 @@ } /** - * SecurityPostureConfig mode. - * @member {google.container.v1.SecurityPostureConfig.Mode|null|undefined} mode - * @memberof google.container.v1.SecurityPostureConfig + * UserManagedKeysConfig clusterCa. + * @member {string} clusterCa + * @memberof google.container.v1.UserManagedKeysConfig * @instance */ - SecurityPostureConfig.prototype.mode = null; + UserManagedKeysConfig.prototype.clusterCa = ""; /** - * SecurityPostureConfig vulnerabilityMode. - * @member {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null|undefined} vulnerabilityMode - * @memberof google.container.v1.SecurityPostureConfig + * UserManagedKeysConfig etcdApiCa. + * @member {string} etcdApiCa + * @memberof google.container.v1.UserManagedKeysConfig * @instance */ - SecurityPostureConfig.prototype.vulnerabilityMode = null; + UserManagedKeysConfig.prototype.etcdApiCa = ""; - // OneOf field names bound to virtual getters and setters - var $oneOfFields; + /** + * UserManagedKeysConfig etcdPeerCa. + * @member {string} etcdPeerCa + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.etcdPeerCa = ""; /** - * SecurityPostureConfig _mode. - * @member {"mode"|undefined} _mode - * @memberof google.container.v1.SecurityPostureConfig + * UserManagedKeysConfig serviceAccountSigningKeys. + * @member {Array.} serviceAccountSigningKeys + * @memberof google.container.v1.UserManagedKeysConfig * @instance */ - Object.defineProperty(SecurityPostureConfig.prototype, "_mode", { - get: $util.oneOfGetter($oneOfFields = ["mode"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserManagedKeysConfig.prototype.serviceAccountSigningKeys = $util.emptyArray; /** - * SecurityPostureConfig _vulnerabilityMode. - * @member {"vulnerabilityMode"|undefined} _vulnerabilityMode - * @memberof google.container.v1.SecurityPostureConfig + * UserManagedKeysConfig serviceAccountVerificationKeys. + * @member {Array.} serviceAccountVerificationKeys + * @memberof google.container.v1.UserManagedKeysConfig * @instance */ - Object.defineProperty(SecurityPostureConfig.prototype, "_vulnerabilityMode", { - get: $util.oneOfGetter($oneOfFields = ["vulnerabilityMode"]), - set: $util.oneOfSetter($oneOfFields) - }); + UserManagedKeysConfig.prototype.serviceAccountVerificationKeys = $util.emptyArray; /** - * Creates a new SecurityPostureConfig instance using the specified properties. + * UserManagedKeysConfig aggregationCa. + * @member {string} aggregationCa + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.aggregationCa = ""; + + /** + * UserManagedKeysConfig controlPlaneDiskEncryptionKey. + * @member {string} controlPlaneDiskEncryptionKey + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.controlPlaneDiskEncryptionKey = ""; + + /** + * UserManagedKeysConfig gkeopsEtcdBackupEncryptionKey. + * @member {string} gkeopsEtcdBackupEncryptionKey + * @memberof google.container.v1.UserManagedKeysConfig + * @instance + */ + UserManagedKeysConfig.prototype.gkeopsEtcdBackupEncryptionKey = ""; + + /** + * Creates a new UserManagedKeysConfig instance using the specified properties. * @function create - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static - * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig instance + * @param {google.container.v1.IUserManagedKeysConfig=} [properties] Properties to set + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig instance */ - SecurityPostureConfig.create = function create(properties) { - return new SecurityPostureConfig(properties); + UserManagedKeysConfig.create = function create(properties) { + return new UserManagedKeysConfig(properties); }; /** - * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * Encodes the specified UserManagedKeysConfig message. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. * @function encode - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static - * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {google.container.v1.IUserManagedKeysConfig} message UserManagedKeysConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityPostureConfig.encode = function encode(message, writer) { + UserManagedKeysConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) - writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); - if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) - writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); + if (message.clusterCa != null && Object.hasOwnProperty.call(message, "clusterCa")) + writer.uint32(/* id 10, wireType 2 =*/82).string(message.clusterCa); + if (message.etcdApiCa != null && Object.hasOwnProperty.call(message, "etcdApiCa")) + writer.uint32(/* id 11, wireType 2 =*/90).string(message.etcdApiCa); + if (message.etcdPeerCa != null && Object.hasOwnProperty.call(message, "etcdPeerCa")) + writer.uint32(/* id 12, wireType 2 =*/98).string(message.etcdPeerCa); + if (message.serviceAccountSigningKeys != null && message.serviceAccountSigningKeys.length) + for (var i = 0; i < message.serviceAccountSigningKeys.length; ++i) + writer.uint32(/* id 13, wireType 2 =*/106).string(message.serviceAccountSigningKeys[i]); + if (message.serviceAccountVerificationKeys != null && message.serviceAccountVerificationKeys.length) + for (var i = 0; i < message.serviceAccountVerificationKeys.length; ++i) + writer.uint32(/* id 14, wireType 2 =*/114).string(message.serviceAccountVerificationKeys[i]); + if (message.aggregationCa != null && Object.hasOwnProperty.call(message, "aggregationCa")) + writer.uint32(/* id 15, wireType 2 =*/122).string(message.aggregationCa); + if (message.controlPlaneDiskEncryptionKey != null && Object.hasOwnProperty.call(message, "controlPlaneDiskEncryptionKey")) + writer.uint32(/* id 16, wireType 2 =*/130).string(message.controlPlaneDiskEncryptionKey); + if (message.gkeopsEtcdBackupEncryptionKey != null && Object.hasOwnProperty.call(message, "gkeopsEtcdBackupEncryptionKey")) + writer.uint32(/* id 17, wireType 2 =*/138).string(message.gkeopsEtcdBackupEncryptionKey); return writer; }; /** - * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * Encodes the specified UserManagedKeysConfig message, length delimited. Does not implicitly {@link google.container.v1.UserManagedKeysConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static - * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {google.container.v1.IUserManagedKeysConfig} message UserManagedKeysConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { + UserManagedKeysConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * Decodes a UserManagedKeysConfig message from the specified reader or buffer. * @function decode - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityPostureConfig.decode = function decode(reader, length) { + UserManagedKeysConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecurityPostureConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.UserManagedKeysConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { - case 1: { - message.mode = reader.int32(); + case 10: { + message.clusterCa = reader.string(); break; } - case 2: { - message.vulnerabilityMode = reader.int32(); + case 11: { + message.etcdApiCa = reader.string(); + break; + } + case 12: { + message.etcdPeerCa = reader.string(); + break; + } + case 13: { + if (!(message.serviceAccountSigningKeys && message.serviceAccountSigningKeys.length)) + message.serviceAccountSigningKeys = []; + message.serviceAccountSigningKeys.push(reader.string()); + break; + } + case 14: { + if (!(message.serviceAccountVerificationKeys && message.serviceAccountVerificationKeys.length)) + message.serviceAccountVerificationKeys = []; + message.serviceAccountVerificationKeys.push(reader.string()); + break; + } + case 15: { + message.aggregationCa = reader.string(); + break; + } + case 16: { + message.controlPlaneDiskEncryptionKey = reader.string(); + break; + } + case 17: { + message.gkeopsEtcdBackupEncryptionKey = reader.string(); break; } default: @@ -18279,234 +18935,207 @@ }; /** - * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * Decodes a UserManagedKeysConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { + UserManagedKeysConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a SecurityPostureConfig message. + * Verifies a UserManagedKeysConfig message. * @function verify - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - SecurityPostureConfig.verify = function verify(message) { + UserManagedKeysConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - var properties = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - properties._mode = 1; - switch (message.mode) { - default: - return "mode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } - if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { - properties._vulnerabilityMode = 1; - switch (message.vulnerabilityMode) { - default: - return "vulnerabilityMode: enum value expected"; - case 0: - case 1: - case 2: - case 3: - break; - } - } + if (message.clusterCa != null && message.hasOwnProperty("clusterCa")) + if (!$util.isString(message.clusterCa)) + return "clusterCa: string expected"; + if (message.etcdApiCa != null && message.hasOwnProperty("etcdApiCa")) + if (!$util.isString(message.etcdApiCa)) + return "etcdApiCa: string expected"; + if (message.etcdPeerCa != null && message.hasOwnProperty("etcdPeerCa")) + if (!$util.isString(message.etcdPeerCa)) + return "etcdPeerCa: string expected"; + if (message.serviceAccountSigningKeys != null && message.hasOwnProperty("serviceAccountSigningKeys")) { + if (!Array.isArray(message.serviceAccountSigningKeys)) + return "serviceAccountSigningKeys: array expected"; + for (var i = 0; i < message.serviceAccountSigningKeys.length; ++i) + if (!$util.isString(message.serviceAccountSigningKeys[i])) + return "serviceAccountSigningKeys: string[] expected"; + } + if (message.serviceAccountVerificationKeys != null && message.hasOwnProperty("serviceAccountVerificationKeys")) { + if (!Array.isArray(message.serviceAccountVerificationKeys)) + return "serviceAccountVerificationKeys: array expected"; + for (var i = 0; i < message.serviceAccountVerificationKeys.length; ++i) + if (!$util.isString(message.serviceAccountVerificationKeys[i])) + return "serviceAccountVerificationKeys: string[] expected"; + } + if (message.aggregationCa != null && message.hasOwnProperty("aggregationCa")) + if (!$util.isString(message.aggregationCa)) + return "aggregationCa: string expected"; + if (message.controlPlaneDiskEncryptionKey != null && message.hasOwnProperty("controlPlaneDiskEncryptionKey")) + if (!$util.isString(message.controlPlaneDiskEncryptionKey)) + return "controlPlaneDiskEncryptionKey: string expected"; + if (message.gkeopsEtcdBackupEncryptionKey != null && message.hasOwnProperty("gkeopsEtcdBackupEncryptionKey")) + if (!$util.isString(message.gkeopsEtcdBackupEncryptionKey)) + return "gkeopsEtcdBackupEncryptionKey: string expected"; return null; }; /** - * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * Creates a UserManagedKeysConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static * @param {Object.} object Plain object - * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @returns {google.container.v1.UserManagedKeysConfig} UserManagedKeysConfig */ - SecurityPostureConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.SecurityPostureConfig) + UserManagedKeysConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.UserManagedKeysConfig) return object; - var message = new $root.google.container.v1.SecurityPostureConfig(); - switch (object.mode) { - default: - if (typeof object.mode === "number") { - message.mode = object.mode; - break; - } - break; - case "MODE_UNSPECIFIED": - case 0: - message.mode = 0; - break; - case "DISABLED": - case 1: - message.mode = 1; - break; - case "BASIC": - case 2: - message.mode = 2; - break; - case "ENTERPRISE": - case 3: - message.mode = 3; - break; - } - switch (object.vulnerabilityMode) { - default: - if (typeof object.vulnerabilityMode === "number") { - message.vulnerabilityMode = object.vulnerabilityMode; - break; - } - break; - case "VULNERABILITY_MODE_UNSPECIFIED": - case 0: - message.vulnerabilityMode = 0; - break; - case "VULNERABILITY_DISABLED": - case 1: - message.vulnerabilityMode = 1; - break; - case "VULNERABILITY_BASIC": - case 2: - message.vulnerabilityMode = 2; - break; - case "VULNERABILITY_ENTERPRISE": - case 3: - message.vulnerabilityMode = 3; - break; - } - return message; - }; - - /** - * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + var message = new $root.google.container.v1.UserManagedKeysConfig(); + if (object.clusterCa != null) + message.clusterCa = String(object.clusterCa); + if (object.etcdApiCa != null) + message.etcdApiCa = String(object.etcdApiCa); + if (object.etcdPeerCa != null) + message.etcdPeerCa = String(object.etcdPeerCa); + if (object.serviceAccountSigningKeys) { + if (!Array.isArray(object.serviceAccountSigningKeys)) + throw TypeError(".google.container.v1.UserManagedKeysConfig.serviceAccountSigningKeys: array expected"); + message.serviceAccountSigningKeys = []; + for (var i = 0; i < object.serviceAccountSigningKeys.length; ++i) + message.serviceAccountSigningKeys[i] = String(object.serviceAccountSigningKeys[i]); + } + if (object.serviceAccountVerificationKeys) { + if (!Array.isArray(object.serviceAccountVerificationKeys)) + throw TypeError(".google.container.v1.UserManagedKeysConfig.serviceAccountVerificationKeys: array expected"); + message.serviceAccountVerificationKeys = []; + for (var i = 0; i < object.serviceAccountVerificationKeys.length; ++i) + message.serviceAccountVerificationKeys[i] = String(object.serviceAccountVerificationKeys[i]); + } + if (object.aggregationCa != null) + message.aggregationCa = String(object.aggregationCa); + if (object.controlPlaneDiskEncryptionKey != null) + message.controlPlaneDiskEncryptionKey = String(object.controlPlaneDiskEncryptionKey); + if (object.gkeopsEtcdBackupEncryptionKey != null) + message.gkeopsEtcdBackupEncryptionKey = String(object.gkeopsEtcdBackupEncryptionKey); + return message; + }; + + /** + * Creates a plain object from a UserManagedKeysConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static - * @param {google.container.v1.SecurityPostureConfig} message SecurityPostureConfig + * @param {google.container.v1.UserManagedKeysConfig} message UserManagedKeysConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - SecurityPostureConfig.toObject = function toObject(message, options) { + UserManagedKeysConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (message.mode != null && message.hasOwnProperty("mode")) { - object.mode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] : message.mode; - if (options.oneofs) - object._mode = "mode"; - } - if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { - object.vulnerabilityMode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; - if (options.oneofs) - object._vulnerabilityMode = "vulnerabilityMode"; + if (options.arrays || options.defaults) { + object.serviceAccountSigningKeys = []; + object.serviceAccountVerificationKeys = []; } + if (options.defaults) { + object.clusterCa = ""; + object.etcdApiCa = ""; + object.etcdPeerCa = ""; + object.aggregationCa = ""; + object.controlPlaneDiskEncryptionKey = ""; + object.gkeopsEtcdBackupEncryptionKey = ""; + } + if (message.clusterCa != null && message.hasOwnProperty("clusterCa")) + object.clusterCa = message.clusterCa; + if (message.etcdApiCa != null && message.hasOwnProperty("etcdApiCa")) + object.etcdApiCa = message.etcdApiCa; + if (message.etcdPeerCa != null && message.hasOwnProperty("etcdPeerCa")) + object.etcdPeerCa = message.etcdPeerCa; + if (message.serviceAccountSigningKeys && message.serviceAccountSigningKeys.length) { + object.serviceAccountSigningKeys = []; + for (var j = 0; j < message.serviceAccountSigningKeys.length; ++j) + object.serviceAccountSigningKeys[j] = message.serviceAccountSigningKeys[j]; + } + if (message.serviceAccountVerificationKeys && message.serviceAccountVerificationKeys.length) { + object.serviceAccountVerificationKeys = []; + for (var j = 0; j < message.serviceAccountVerificationKeys.length; ++j) + object.serviceAccountVerificationKeys[j] = message.serviceAccountVerificationKeys[j]; + } + if (message.aggregationCa != null && message.hasOwnProperty("aggregationCa")) + object.aggregationCa = message.aggregationCa; + if (message.controlPlaneDiskEncryptionKey != null && message.hasOwnProperty("controlPlaneDiskEncryptionKey")) + object.controlPlaneDiskEncryptionKey = message.controlPlaneDiskEncryptionKey; + if (message.gkeopsEtcdBackupEncryptionKey != null && message.hasOwnProperty("gkeopsEtcdBackupEncryptionKey")) + object.gkeopsEtcdBackupEncryptionKey = message.gkeopsEtcdBackupEncryptionKey; return object; }; /** - * Converts this SecurityPostureConfig to JSON. + * Converts this UserManagedKeysConfig to JSON. * @function toJSON - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @instance * @returns {Object.} JSON object */ - SecurityPostureConfig.prototype.toJSON = function toJSON() { + UserManagedKeysConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for SecurityPostureConfig + * Gets the default type url for UserManagedKeysConfig * @function getTypeUrl - * @memberof google.container.v1.SecurityPostureConfig + * @memberof google.container.v1.UserManagedKeysConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + UserManagedKeysConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.container.v1.SecurityPostureConfig"; + return typeUrlPrefix + "/google.container.v1.UserManagedKeysConfig"; }; - /** - * Mode enum. - * @name google.container.v1.SecurityPostureConfig.Mode - * @enum {number} - * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value - * @property {number} DISABLED=1 DISABLED value - * @property {number} BASIC=2 BASIC value - * @property {number} ENTERPRISE=3 ENTERPRISE value - */ - SecurityPostureConfig.Mode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "DISABLED"] = 1; - values[valuesById[2] = "BASIC"] = 2; - values[valuesById[3] = "ENTERPRISE"] = 3; - return values; - })(); - - /** - * VulnerabilityMode enum. - * @name google.container.v1.SecurityPostureConfig.VulnerabilityMode - * @enum {number} - * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value - * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value - * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value - * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value - */ - SecurityPostureConfig.VulnerabilityMode = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; - values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; - values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; - values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; - return values; - })(); - - return SecurityPostureConfig; + return UserManagedKeysConfig; })(); - v1.NodePoolAutoConfig = (function() { + v1.CompliancePostureConfig = (function() { /** - * Properties of a NodePoolAutoConfig. + * Properties of a CompliancePostureConfig. * @memberof google.container.v1 - * @interface INodePoolAutoConfig - * @property {google.container.v1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags - * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags - * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig + * @interface ICompliancePostureConfig + * @property {google.container.v1.CompliancePostureConfig.Mode|null} [mode] CompliancePostureConfig mode + * @property {Array.|null} [complianceStandards] CompliancePostureConfig complianceStandards */ /** - * Constructs a new NodePoolAutoConfig. + * Constructs a new CompliancePostureConfig. * @memberof google.container.v1 - * @classdesc Represents a NodePoolAutoConfig. - * @implements INodePoolAutoConfig + * @classdesc Represents a CompliancePostureConfig. + * @implements ICompliancePostureConfig * @constructor - * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set + * @param {google.container.v1.ICompliancePostureConfig=} [properties] Properties to set */ - function NodePoolAutoConfig(properties) { + function CompliancePostureConfig(properties) { + this.complianceStandards = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18514,103 +19143,106 @@ } /** - * NodePoolAutoConfig networkTags. - * @member {google.container.v1.INetworkTags|null|undefined} networkTags - * @memberof google.container.v1.NodePoolAutoConfig + * CompliancePostureConfig mode. + * @member {google.container.v1.CompliancePostureConfig.Mode|null|undefined} mode + * @memberof google.container.v1.CompliancePostureConfig * @instance */ - NodePoolAutoConfig.prototype.networkTags = null; + CompliancePostureConfig.prototype.mode = null; /** - * NodePoolAutoConfig resourceManagerTags. - * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags - * @memberof google.container.v1.NodePoolAutoConfig + * CompliancePostureConfig complianceStandards. + * @member {Array.} complianceStandards + * @memberof google.container.v1.CompliancePostureConfig * @instance */ - NodePoolAutoConfig.prototype.resourceManagerTags = null; + CompliancePostureConfig.prototype.complianceStandards = $util.emptyArray; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * NodePoolAutoConfig nodeKubeletConfig. - * @member {google.container.v1.INodeKubeletConfig|null|undefined} nodeKubeletConfig - * @memberof google.container.v1.NodePoolAutoConfig + * CompliancePostureConfig _mode. + * @member {"mode"|undefined} _mode + * @memberof google.container.v1.CompliancePostureConfig * @instance */ - NodePoolAutoConfig.prototype.nodeKubeletConfig = null; + Object.defineProperty(CompliancePostureConfig.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); /** - * Creates a new NodePoolAutoConfig instance using the specified properties. + * Creates a new CompliancePostureConfig instance using the specified properties. * @function create - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static - * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig instance + * @param {google.container.v1.ICompliancePostureConfig=} [properties] Properties to set + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig instance */ - NodePoolAutoConfig.create = function create(properties) { - return new NodePoolAutoConfig(properties); + CompliancePostureConfig.create = function create(properties) { + return new CompliancePostureConfig(properties); }; /** - * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * Encodes the specified CompliancePostureConfig message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. * @function encode - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static - * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {google.container.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodePoolAutoConfig.encode = function encode(message, writer) { + CompliancePostureConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.networkTags != null && Object.hasOwnProperty.call(message, "networkTags")) - $root.google.container.v1.NetworkTags.encode(message.networkTags, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); - if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) - $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); - if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) - $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.complianceStandards != null && message.complianceStandards.length) + for (var i = 0; i < message.complianceStandards.length; ++i) + $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.encode(message.complianceStandards[i], writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); return writer; }; /** - * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * Encodes the specified CompliancePostureConfig message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static - * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {google.container.v1.ICompliancePostureConfig} message CompliancePostureConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodePoolAutoConfig.encodeDelimited = function encodeDelimited(message, writer) { + CompliancePostureConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * Decodes a CompliancePostureConfig message from the specified reader or buffer. * @function decode - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodePoolAutoConfig.decode = function decode(reader, length) { + CompliancePostureConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolAutoConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompliancePostureConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.networkTags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); + message.mode = reader.int32(); break; } case 2: { - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); - break; - } - case 3: { - message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + if (!(message.complianceStandards && message.complianceStandards.length)) + message.complianceStandards = []; + message.complianceStandards.push($root.google.container.v1.CompliancePostureConfig.ComplianceStandard.decode(reader, reader.uint32())); break; } default: @@ -18622,154 +19254,414 @@ }; /** - * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * Decodes a CompliancePostureConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodePoolAutoConfig.decodeDelimited = function decodeDelimited(reader) { + CompliancePostureConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodePoolAutoConfig message. + * Verifies a CompliancePostureConfig message. * @function verify - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NodePoolAutoConfig.verify = function verify(message) { + CompliancePostureConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.networkTags != null && message.hasOwnProperty("networkTags")) { - var error = $root.google.container.v1.NetworkTags.verify(message.networkTags); - if (error) - return "networkTags." + error; - } - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { - var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); - if (error) - return "resourceManagerTags." + error; + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + break; + } } - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { - var error = $root.google.container.v1.NodeKubeletConfig.verify(message.nodeKubeletConfig); - if (error) - return "nodeKubeletConfig." + error; + if (message.complianceStandards != null && message.hasOwnProperty("complianceStandards")) { + if (!Array.isArray(message.complianceStandards)) + return "complianceStandards: array expected"; + for (var i = 0; i < message.complianceStandards.length; ++i) { + var error = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.verify(message.complianceStandards[i]); + if (error) + return "complianceStandards." + error; + } } return null; }; /** - * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. + * Creates a CompliancePostureConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static * @param {Object.} object Plain object - * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @returns {google.container.v1.CompliancePostureConfig} CompliancePostureConfig */ - NodePoolAutoConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePoolAutoConfig) + CompliancePostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CompliancePostureConfig) return object; - var message = new $root.google.container.v1.NodePoolAutoConfig(); - if (object.networkTags != null) { - if (typeof object.networkTags !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.networkTags: object expected"); - message.networkTags = $root.google.container.v1.NetworkTags.fromObject(object.networkTags); - } - if (object.resourceManagerTags != null) { - if (typeof object.resourceManagerTags !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.resourceManagerTags: object expected"); - message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); + var message = new $root.google.container.v1.CompliancePostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "ENABLED": + case 2: + message.mode = 2; + break; } - if (object.nodeKubeletConfig != null) { - if (typeof object.nodeKubeletConfig !== "object") - throw TypeError(".google.container.v1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); - message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); + if (object.complianceStandards) { + if (!Array.isArray(object.complianceStandards)) + throw TypeError(".google.container.v1.CompliancePostureConfig.complianceStandards: array expected"); + message.complianceStandards = []; + for (var i = 0; i < object.complianceStandards.length; ++i) { + if (typeof object.complianceStandards[i] !== "object") + throw TypeError(".google.container.v1.CompliancePostureConfig.complianceStandards: object expected"); + message.complianceStandards[i] = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.fromObject(object.complianceStandards[i]); + } } return message; }; /** - * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. + * Creates a plain object from a CompliancePostureConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static - * @param {google.container.v1.NodePoolAutoConfig} message NodePoolAutoConfig + * @param {google.container.v1.CompliancePostureConfig} message CompliancePostureConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodePoolAutoConfig.toObject = function toObject(message, options) { + CompliancePostureConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) { - object.networkTags = null; - object.resourceManagerTags = null; - object.nodeKubeletConfig = null; + if (options.arrays || options.defaults) + object.complianceStandards = []; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.container.v1.CompliancePostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.CompliancePostureConfig.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.complianceStandards && message.complianceStandards.length) { + object.complianceStandards = []; + for (var j = 0; j < message.complianceStandards.length; ++j) + object.complianceStandards[j] = $root.google.container.v1.CompliancePostureConfig.ComplianceStandard.toObject(message.complianceStandards[j], options); } - if (message.networkTags != null && message.hasOwnProperty("networkTags")) - object.networkTags = $root.google.container.v1.NetworkTags.toObject(message.networkTags, options); - if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) - object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); - if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) - object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); return object; }; /** - * Converts this NodePoolAutoConfig to JSON. + * Converts this CompliancePostureConfig to JSON. * @function toJSON - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @instance * @returns {Object.} JSON object */ - NodePoolAutoConfig.prototype.toJSON = function toJSON() { + CompliancePostureConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NodePoolAutoConfig + * Gets the default type url for CompliancePostureConfig * @function getTypeUrl - * @memberof google.container.v1.NodePoolAutoConfig + * @memberof google.container.v1.CompliancePostureConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NodePoolAutoConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + CompliancePostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.container.v1.NodePoolAutoConfig"; + return typeUrlPrefix + "/google.container.v1.CompliancePostureConfig"; }; - return NodePoolAutoConfig; + /** + * Mode enum. + * @name google.container.v1.CompliancePostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} ENABLED=2 ENABLED value + */ + CompliancePostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "ENABLED"] = 2; + return values; + })(); + + CompliancePostureConfig.ComplianceStandard = (function() { + + /** + * Properties of a ComplianceStandard. + * @memberof google.container.v1.CompliancePostureConfig + * @interface IComplianceStandard + * @property {string|null} [standard] ComplianceStandard standard + */ + + /** + * Constructs a new ComplianceStandard. + * @memberof google.container.v1.CompliancePostureConfig + * @classdesc Represents a ComplianceStandard. + * @implements IComplianceStandard + * @constructor + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + */ + function ComplianceStandard(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ComplianceStandard standard. + * @member {string|null|undefined} standard + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + ComplianceStandard.prototype.standard = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * ComplianceStandard _standard. + * @member {"standard"|undefined} _standard + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @instance + */ + Object.defineProperty(ComplianceStandard.prototype, "_standard", { + get: $util.oneOfGetter($oneOfFields = ["standard"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new ComplianceStandard instance using the specified properties. + * @function create + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard=} [properties] Properties to set + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard instance + */ + ComplianceStandard.create = function create(properties) { + return new ComplianceStandard(properties); + }; + + /** + * Encodes the specified ComplianceStandard message. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encode + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.standard != null && Object.hasOwnProperty.call(message, "standard")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.standard); + return writer; + }; + + /** + * Encodes the specified ComplianceStandard message, length delimited. Does not implicitly {@link google.container.v1.CompliancePostureConfig.ComplianceStandard.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.IComplianceStandard} message ComplianceStandard message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ComplianceStandard.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.CompliancePostureConfig.ComplianceStandard(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.standard = reader.string(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ComplianceStandard message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ComplianceStandard.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ComplianceStandard message. + * @function verify + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ComplianceStandard.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + properties._standard = 1; + if (!$util.isString(message.standard)) + return "standard: string expected"; + } + return null; + }; + + /** + * Creates a ComplianceStandard message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.CompliancePostureConfig.ComplianceStandard} ComplianceStandard + */ + ComplianceStandard.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.CompliancePostureConfig.ComplianceStandard) + return object; + var message = new $root.google.container.v1.CompliancePostureConfig.ComplianceStandard(); + if (object.standard != null) + message.standard = String(object.standard); + return message; + }; + + /** + * Creates a plain object from a ComplianceStandard message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {google.container.v1.CompliancePostureConfig.ComplianceStandard} message ComplianceStandard + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ComplianceStandard.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.standard != null && message.hasOwnProperty("standard")) { + object.standard = message.standard; + if (options.oneofs) + object._standard = "standard"; + } + return object; + }; + + /** + * Converts this ComplianceStandard to JSON. + * @function toJSON + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @instance + * @returns {Object.} JSON object + */ + ComplianceStandard.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ComplianceStandard + * @function getTypeUrl + * @memberof google.container.v1.CompliancePostureConfig.ComplianceStandard + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ComplianceStandard.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.CompliancePostureConfig.ComplianceStandard"; + }; + + return ComplianceStandard; + })(); + + return CompliancePostureConfig; })(); - v1.NodePoolDefaults = (function() { + v1.K8sBetaAPIConfig = (function() { /** - * Properties of a NodePoolDefaults. + * Properties of a K8sBetaAPIConfig. * @memberof google.container.v1 - * @interface INodePoolDefaults - * @property {google.container.v1.INodeConfigDefaults|null} [nodeConfigDefaults] NodePoolDefaults nodeConfigDefaults + * @interface IK8sBetaAPIConfig + * @property {Array.|null} [enabledApis] K8sBetaAPIConfig enabledApis */ /** - * Constructs a new NodePoolDefaults. + * Constructs a new K8sBetaAPIConfig. * @memberof google.container.v1 - * @classdesc Represents a NodePoolDefaults. - * @implements INodePoolDefaults + * @classdesc Represents a K8sBetaAPIConfig. + * @implements IK8sBetaAPIConfig * @constructor - * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set + * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set */ - function NodePoolDefaults(properties) { + function K8sBetaAPIConfig(properties) { + this.enabledApis = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18777,75 +19669,78 @@ } /** - * NodePoolDefaults nodeConfigDefaults. - * @member {google.container.v1.INodeConfigDefaults|null|undefined} nodeConfigDefaults - * @memberof google.container.v1.NodePoolDefaults + * K8sBetaAPIConfig enabledApis. + * @member {Array.} enabledApis + * @memberof google.container.v1.K8sBetaAPIConfig * @instance */ - NodePoolDefaults.prototype.nodeConfigDefaults = null; + K8sBetaAPIConfig.prototype.enabledApis = $util.emptyArray; /** - * Creates a new NodePoolDefaults instance using the specified properties. + * Creates a new K8sBetaAPIConfig instance using the specified properties. * @function create - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static - * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults instance + * @param {google.container.v1.IK8sBetaAPIConfig=} [properties] Properties to set + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig instance */ - NodePoolDefaults.create = function create(properties) { - return new NodePoolDefaults(properties); + K8sBetaAPIConfig.create = function create(properties) { + return new K8sBetaAPIConfig(properties); }; /** - * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * Encodes the specified K8sBetaAPIConfig message. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. * @function encode - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static - * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodePoolDefaults.encode = function encode(message, writer) { + K8sBetaAPIConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.nodeConfigDefaults != null && Object.hasOwnProperty.call(message, "nodeConfigDefaults")) - $root.google.container.v1.NodeConfigDefaults.encode(message.nodeConfigDefaults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.enabledApis != null && message.enabledApis.length) + for (var i = 0; i < message.enabledApis.length; ++i) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.enabledApis[i]); return writer; }; /** - * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * Encodes the specified K8sBetaAPIConfig message, length delimited. Does not implicitly {@link google.container.v1.K8sBetaAPIConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static - * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {google.container.v1.IK8sBetaAPIConfig} message K8sBetaAPIConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - NodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { + K8sBetaAPIConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a NodePoolDefaults message from the specified reader or buffer. + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer. * @function decode - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodePoolDefaults.decode = function decode(reader, length) { + K8sBetaAPIConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolDefaults(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.K8sBetaAPIConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.decode(reader, reader.uint32()); + if (!(message.enabledApis && message.enabledApis.length)) + message.enabledApis = []; + message.enabledApis.push(reader.string()); break; } default: @@ -18857,130 +19752,135 @@ }; /** - * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. + * Decodes a K8sBetaAPIConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - NodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { + K8sBetaAPIConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a NodePoolDefaults message. + * Verifies a K8sBetaAPIConfig message. * @function verify - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - NodePoolDefaults.verify = function verify(message) { + K8sBetaAPIConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) { - var error = $root.google.container.v1.NodeConfigDefaults.verify(message.nodeConfigDefaults); - if (error) - return "nodeConfigDefaults." + error; + if (message.enabledApis != null && message.hasOwnProperty("enabledApis")) { + if (!Array.isArray(message.enabledApis)) + return "enabledApis: array expected"; + for (var i = 0; i < message.enabledApis.length; ++i) + if (!$util.isString(message.enabledApis[i])) + return "enabledApis: string[] expected"; } return null; }; /** - * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * Creates a K8sBetaAPIConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static * @param {Object.} object Plain object - * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @returns {google.container.v1.K8sBetaAPIConfig} K8sBetaAPIConfig */ - NodePoolDefaults.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.NodePoolDefaults) + K8sBetaAPIConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.K8sBetaAPIConfig) return object; - var message = new $root.google.container.v1.NodePoolDefaults(); - if (object.nodeConfigDefaults != null) { - if (typeof object.nodeConfigDefaults !== "object") - throw TypeError(".google.container.v1.NodePoolDefaults.nodeConfigDefaults: object expected"); - message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.fromObject(object.nodeConfigDefaults); + var message = new $root.google.container.v1.K8sBetaAPIConfig(); + if (object.enabledApis) { + if (!Array.isArray(object.enabledApis)) + throw TypeError(".google.container.v1.K8sBetaAPIConfig.enabledApis: array expected"); + message.enabledApis = []; + for (var i = 0; i < object.enabledApis.length; ++i) + message.enabledApis[i] = String(object.enabledApis[i]); } return message; }; /** - * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. + * Creates a plain object from a K8sBetaAPIConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static - * @param {google.container.v1.NodePoolDefaults} message NodePoolDefaults + * @param {google.container.v1.K8sBetaAPIConfig} message K8sBetaAPIConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - NodePoolDefaults.toObject = function toObject(message, options) { + K8sBetaAPIConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.nodeConfigDefaults = null; - if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) - object.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.toObject(message.nodeConfigDefaults, options); + if (options.arrays || options.defaults) + object.enabledApis = []; + if (message.enabledApis && message.enabledApis.length) { + object.enabledApis = []; + for (var j = 0; j < message.enabledApis.length; ++j) + object.enabledApis[j] = message.enabledApis[j]; + } return object; }; /** - * Converts this NodePoolDefaults to JSON. + * Converts this K8sBetaAPIConfig to JSON. * @function toJSON - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @instance * @returns {Object.} JSON object */ - NodePoolDefaults.prototype.toJSON = function toJSON() { + K8sBetaAPIConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for NodePoolDefaults + * Gets the default type url for K8sBetaAPIConfig * @function getTypeUrl - * @memberof google.container.v1.NodePoolDefaults + * @memberof google.container.v1.K8sBetaAPIConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - NodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + K8sBetaAPIConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.container.v1.NodePoolDefaults"; + return typeUrlPrefix + "/google.container.v1.K8sBetaAPIConfig"; }; - return NodePoolDefaults; + return K8sBetaAPIConfig; })(); - v1.NodeConfigDefaults = (function() { + v1.SecurityPostureConfig = (function() { /** - * Properties of a NodeConfigDefaults. + * Properties of a SecurityPostureConfig. * @memberof google.container.v1 - * @interface INodeConfigDefaults - * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] NodeConfigDefaults gcfsConfig - * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfigDefaults loggingConfig - * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] NodeConfigDefaults containerdConfig - * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodeConfigDefaults nodeKubeletConfig + * @interface ISecurityPostureConfig + * @property {google.container.v1.SecurityPostureConfig.Mode|null} [mode] SecurityPostureConfig mode + * @property {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null} [vulnerabilityMode] SecurityPostureConfig vulnerabilityMode */ /** - * Constructs a new NodeConfigDefaults. + * Constructs a new SecurityPostureConfig. * @memberof google.container.v1 - * @classdesc Represents a NodeConfigDefaults. - * @implements INodeConfigDefaults + * @classdesc Represents a SecurityPostureConfig. + * @implements ISecurityPostureConfig * @constructor - * @param {google.container.v1.INodeConfigDefaults=} [properties] Properties to set + * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set */ - function NodeConfigDefaults(properties) { + function SecurityPostureConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -18988,25 +19888,853 @@ } /** - * NodeConfigDefaults gcfsConfig. - * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig - * @memberof google.container.v1.NodeConfigDefaults + * SecurityPostureConfig mode. + * @member {google.container.v1.SecurityPostureConfig.Mode|null|undefined} mode + * @memberof google.container.v1.SecurityPostureConfig * @instance */ - NodeConfigDefaults.prototype.gcfsConfig = null; + SecurityPostureConfig.prototype.mode = null; /** - * NodeConfigDefaults loggingConfig. - * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig - * @memberof google.container.v1.NodeConfigDefaults + * SecurityPostureConfig vulnerabilityMode. + * @member {google.container.v1.SecurityPostureConfig.VulnerabilityMode|null|undefined} vulnerabilityMode + * @memberof google.container.v1.SecurityPostureConfig * @instance */ - NodeConfigDefaults.prototype.loggingConfig = null; + SecurityPostureConfig.prototype.vulnerabilityMode = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; /** - * NodeConfigDefaults containerdConfig. - * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig - * @memberof google.container.v1.NodeConfigDefaults + * SecurityPostureConfig _mode. + * @member {"mode"|undefined} _mode + * @memberof google.container.v1.SecurityPostureConfig + * @instance + */ + Object.defineProperty(SecurityPostureConfig.prototype, "_mode", { + get: $util.oneOfGetter($oneOfFields = ["mode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * SecurityPostureConfig _vulnerabilityMode. + * @member {"vulnerabilityMode"|undefined} _vulnerabilityMode + * @memberof google.container.v1.SecurityPostureConfig + * @instance + */ + Object.defineProperty(SecurityPostureConfig.prototype, "_vulnerabilityMode", { + get: $util.oneOfGetter($oneOfFields = ["vulnerabilityMode"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecurityPostureConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.ISecurityPostureConfig=} [properties] Properties to set + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig instance + */ + SecurityPostureConfig.create = function create(properties) { + return new SecurityPostureConfig(properties); + }; + + /** + * Encodes the specified SecurityPostureConfig message. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPostureConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.mode != null && Object.hasOwnProperty.call(message, "mode")) + writer.uint32(/* id 1, wireType 0 =*/8).int32(message.mode); + if (message.vulnerabilityMode != null && Object.hasOwnProperty.call(message, "vulnerabilityMode")) + writer.uint32(/* id 2, wireType 0 =*/16).int32(message.vulnerabilityMode); + return writer; + }; + + /** + * Encodes the specified SecurityPostureConfig message, length delimited. Does not implicitly {@link google.container.v1.SecurityPostureConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.ISecurityPostureConfig} message SecurityPostureConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecurityPostureConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPostureConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecurityPostureConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.mode = reader.int32(); + break; + } + case 2: { + message.vulnerabilityMode = reader.int32(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecurityPostureConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecurityPostureConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecurityPostureConfig message. + * @function verify + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecurityPostureConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + properties._mode = 1; + switch (message.mode) { + default: + return "mode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { + properties._vulnerabilityMode = 1; + switch (message.vulnerabilityMode) { + default: + return "vulnerabilityMode: enum value expected"; + case 0: + case 1: + case 2: + case 3: + break; + } + } + return null; + }; + + /** + * Creates a SecurityPostureConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecurityPostureConfig} SecurityPostureConfig + */ + SecurityPostureConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecurityPostureConfig) + return object; + var message = new $root.google.container.v1.SecurityPostureConfig(); + switch (object.mode) { + default: + if (typeof object.mode === "number") { + message.mode = object.mode; + break; + } + break; + case "MODE_UNSPECIFIED": + case 0: + message.mode = 0; + break; + case "DISABLED": + case 1: + message.mode = 1; + break; + case "BASIC": + case 2: + message.mode = 2; + break; + case "ENTERPRISE": + case 3: + message.mode = 3; + break; + } + switch (object.vulnerabilityMode) { + default: + if (typeof object.vulnerabilityMode === "number") { + message.vulnerabilityMode = object.vulnerabilityMode; + break; + } + break; + case "VULNERABILITY_MODE_UNSPECIFIED": + case 0: + message.vulnerabilityMode = 0; + break; + case "VULNERABILITY_DISABLED": + case 1: + message.vulnerabilityMode = 1; + break; + case "VULNERABILITY_BASIC": + case 2: + message.vulnerabilityMode = 2; + break; + case "VULNERABILITY_ENTERPRISE": + case 3: + message.vulnerabilityMode = 3; + break; + } + return message; + }; + + /** + * Creates a plain object from a SecurityPostureConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {google.container.v1.SecurityPostureConfig} message SecurityPostureConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecurityPostureConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.mode != null && message.hasOwnProperty("mode")) { + object.mode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] === undefined ? message.mode : $root.google.container.v1.SecurityPostureConfig.Mode[message.mode] : message.mode; + if (options.oneofs) + object._mode = "mode"; + } + if (message.vulnerabilityMode != null && message.hasOwnProperty("vulnerabilityMode")) { + object.vulnerabilityMode = options.enums === String ? $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] === undefined ? message.vulnerabilityMode : $root.google.container.v1.SecurityPostureConfig.VulnerabilityMode[message.vulnerabilityMode] : message.vulnerabilityMode; + if (options.oneofs) + object._vulnerabilityMode = "vulnerabilityMode"; + } + return object; + }; + + /** + * Converts this SecurityPostureConfig to JSON. + * @function toJSON + * @memberof google.container.v1.SecurityPostureConfig + * @instance + * @returns {Object.} JSON object + */ + SecurityPostureConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecurityPostureConfig + * @function getTypeUrl + * @memberof google.container.v1.SecurityPostureConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecurityPostureConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecurityPostureConfig"; + }; + + /** + * Mode enum. + * @name google.container.v1.SecurityPostureConfig.Mode + * @enum {number} + * @property {number} MODE_UNSPECIFIED=0 MODE_UNSPECIFIED value + * @property {number} DISABLED=1 DISABLED value + * @property {number} BASIC=2 BASIC value + * @property {number} ENTERPRISE=3 ENTERPRISE value + */ + SecurityPostureConfig.Mode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "DISABLED"] = 1; + values[valuesById[2] = "BASIC"] = 2; + values[valuesById[3] = "ENTERPRISE"] = 3; + return values; + })(); + + /** + * VulnerabilityMode enum. + * @name google.container.v1.SecurityPostureConfig.VulnerabilityMode + * @enum {number} + * @property {number} VULNERABILITY_MODE_UNSPECIFIED=0 VULNERABILITY_MODE_UNSPECIFIED value + * @property {number} VULNERABILITY_DISABLED=1 VULNERABILITY_DISABLED value + * @property {number} VULNERABILITY_BASIC=2 VULNERABILITY_BASIC value + * @property {number} VULNERABILITY_ENTERPRISE=3 VULNERABILITY_ENTERPRISE value + */ + SecurityPostureConfig.VulnerabilityMode = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "VULNERABILITY_MODE_UNSPECIFIED"] = 0; + values[valuesById[1] = "VULNERABILITY_DISABLED"] = 1; + values[valuesById[2] = "VULNERABILITY_BASIC"] = 2; + values[valuesById[3] = "VULNERABILITY_ENTERPRISE"] = 3; + return values; + })(); + + return SecurityPostureConfig; + })(); + + v1.NodePoolAutoConfig = (function() { + + /** + * Properties of a NodePoolAutoConfig. + * @memberof google.container.v1 + * @interface INodePoolAutoConfig + * @property {google.container.v1.INetworkTags|null} [networkTags] NodePoolAutoConfig networkTags + * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] NodePoolAutoConfig resourceManagerTags + * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodePoolAutoConfig nodeKubeletConfig + */ + + /** + * Constructs a new NodePoolAutoConfig. + * @memberof google.container.v1 + * @classdesc Represents a NodePoolAutoConfig. + * @implements INodePoolAutoConfig + * @constructor + * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set + */ + function NodePoolAutoConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolAutoConfig networkTags. + * @member {google.container.v1.INetworkTags|null|undefined} networkTags + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.networkTags = null; + + /** + * NodePoolAutoConfig resourceManagerTags. + * @member {google.container.v1.IResourceManagerTags|null|undefined} resourceManagerTags + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.resourceManagerTags = null; + + /** + * NodePoolAutoConfig nodeKubeletConfig. + * @member {google.container.v1.INodeKubeletConfig|null|undefined} nodeKubeletConfig + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + */ + NodePoolAutoConfig.prototype.nodeKubeletConfig = null; + + /** + * Creates a new NodePoolAutoConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.INodePoolAutoConfig=} [properties] Properties to set + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig instance + */ + NodePoolAutoConfig.create = function create(properties) { + return new NodePoolAutoConfig(properties); + }; + + /** + * Encodes the specified NodePoolAutoConfig message. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.networkTags != null && Object.hasOwnProperty.call(message, "networkTags")) + $root.google.container.v1.NetworkTags.encode(message.networkTags, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.resourceManagerTags != null && Object.hasOwnProperty.call(message, "resourceManagerTags")) + $root.google.container.v1.ResourceManagerTags.encode(message.resourceManagerTags, writer.uint32(/* id 2, wireType 2 =*/18).fork()).ldelim(); + if (message.nodeKubeletConfig != null && Object.hasOwnProperty.call(message, "nodeKubeletConfig")) + $root.google.container.v1.NodeKubeletConfig.encode(message.nodeKubeletConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolAutoConfig message, length delimited. Does not implicitly {@link google.container.v1.NodePoolAutoConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.INodePoolAutoConfig} message NodePoolAutoConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolAutoConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolAutoConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.networkTags = $root.google.container.v1.NetworkTags.decode(reader, reader.uint32()); + break; + } + case 2: { + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.decode(reader, reader.uint32()); + break; + } + case 3: { + message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolAutoConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolAutoConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolAutoConfig message. + * @function verify + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolAutoConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.networkTags != null && message.hasOwnProperty("networkTags")) { + var error = $root.google.container.v1.NetworkTags.verify(message.networkTags); + if (error) + return "networkTags." + error; + } + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) { + var error = $root.google.container.v1.ResourceManagerTags.verify(message.resourceManagerTags); + if (error) + return "resourceManagerTags." + error; + } + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) { + var error = $root.google.container.v1.NodeKubeletConfig.verify(message.nodeKubeletConfig); + if (error) + return "nodeKubeletConfig." + error; + } + return null; + }; + + /** + * Creates a NodePoolAutoConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePoolAutoConfig} NodePoolAutoConfig + */ + NodePoolAutoConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePoolAutoConfig) + return object; + var message = new $root.google.container.v1.NodePoolAutoConfig(); + if (object.networkTags != null) { + if (typeof object.networkTags !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.networkTags: object expected"); + message.networkTags = $root.google.container.v1.NetworkTags.fromObject(object.networkTags); + } + if (object.resourceManagerTags != null) { + if (typeof object.resourceManagerTags !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.resourceManagerTags: object expected"); + message.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.fromObject(object.resourceManagerTags); + } + if (object.nodeKubeletConfig != null) { + if (typeof object.nodeKubeletConfig !== "object") + throw TypeError(".google.container.v1.NodePoolAutoConfig.nodeKubeletConfig: object expected"); + message.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.nodeKubeletConfig); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolAutoConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {google.container.v1.NodePoolAutoConfig} message NodePoolAutoConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolAutoConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.networkTags = null; + object.resourceManagerTags = null; + object.nodeKubeletConfig = null; + } + if (message.networkTags != null && message.hasOwnProperty("networkTags")) + object.networkTags = $root.google.container.v1.NetworkTags.toObject(message.networkTags, options); + if (message.resourceManagerTags != null && message.hasOwnProperty("resourceManagerTags")) + object.resourceManagerTags = $root.google.container.v1.ResourceManagerTags.toObject(message.resourceManagerTags, options); + if (message.nodeKubeletConfig != null && message.hasOwnProperty("nodeKubeletConfig")) + object.nodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.nodeKubeletConfig, options); + return object; + }; + + /** + * Converts this NodePoolAutoConfig to JSON. + * @function toJSON + * @memberof google.container.v1.NodePoolAutoConfig + * @instance + * @returns {Object.} JSON object + */ + NodePoolAutoConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolAutoConfig + * @function getTypeUrl + * @memberof google.container.v1.NodePoolAutoConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolAutoConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePoolAutoConfig"; + }; + + return NodePoolAutoConfig; + })(); + + v1.NodePoolDefaults = (function() { + + /** + * Properties of a NodePoolDefaults. + * @memberof google.container.v1 + * @interface INodePoolDefaults + * @property {google.container.v1.INodeConfigDefaults|null} [nodeConfigDefaults] NodePoolDefaults nodeConfigDefaults + */ + + /** + * Constructs a new NodePoolDefaults. + * @memberof google.container.v1 + * @classdesc Represents a NodePoolDefaults. + * @implements INodePoolDefaults + * @constructor + * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set + */ + function NodePoolDefaults(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodePoolDefaults nodeConfigDefaults. + * @member {google.container.v1.INodeConfigDefaults|null|undefined} nodeConfigDefaults + * @memberof google.container.v1.NodePoolDefaults + * @instance + */ + NodePoolDefaults.prototype.nodeConfigDefaults = null; + + /** + * Creates a new NodePoolDefaults instance using the specified properties. + * @function create + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.INodePoolDefaults=} [properties] Properties to set + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults instance + */ + NodePoolDefaults.create = function create(properties) { + return new NodePoolDefaults(properties); + }; + + /** + * Encodes the specified NodePoolDefaults message. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * @function encode + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolDefaults.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.nodeConfigDefaults != null && Object.hasOwnProperty.call(message, "nodeConfigDefaults")) + $root.google.container.v1.NodeConfigDefaults.encode(message.nodeConfigDefaults, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + return writer; + }; + + /** + * Encodes the specified NodePoolDefaults message, length delimited. Does not implicitly {@link google.container.v1.NodePoolDefaults.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.INodePoolDefaults} message NodePoolDefaults message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + NodePoolDefaults.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolDefaults.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.NodePoolDefaults(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.decode(reader, reader.uint32()); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a NodePoolDefaults message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + NodePoolDefaults.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a NodePoolDefaults message. + * @function verify + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + NodePoolDefaults.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) { + var error = $root.google.container.v1.NodeConfigDefaults.verify(message.nodeConfigDefaults); + if (error) + return "nodeConfigDefaults." + error; + } + return null; + }; + + /** + * Creates a NodePoolDefaults message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.NodePoolDefaults} NodePoolDefaults + */ + NodePoolDefaults.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.NodePoolDefaults) + return object; + var message = new $root.google.container.v1.NodePoolDefaults(); + if (object.nodeConfigDefaults != null) { + if (typeof object.nodeConfigDefaults !== "object") + throw TypeError(".google.container.v1.NodePoolDefaults.nodeConfigDefaults: object expected"); + message.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.fromObject(object.nodeConfigDefaults); + } + return message; + }; + + /** + * Creates a plain object from a NodePoolDefaults message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {google.container.v1.NodePoolDefaults} message NodePoolDefaults + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + NodePoolDefaults.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.nodeConfigDefaults = null; + if (message.nodeConfigDefaults != null && message.hasOwnProperty("nodeConfigDefaults")) + object.nodeConfigDefaults = $root.google.container.v1.NodeConfigDefaults.toObject(message.nodeConfigDefaults, options); + return object; + }; + + /** + * Converts this NodePoolDefaults to JSON. + * @function toJSON + * @memberof google.container.v1.NodePoolDefaults + * @instance + * @returns {Object.} JSON object + */ + NodePoolDefaults.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for NodePoolDefaults + * @function getTypeUrl + * @memberof google.container.v1.NodePoolDefaults + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + NodePoolDefaults.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.NodePoolDefaults"; + }; + + return NodePoolDefaults; + })(); + + v1.NodeConfigDefaults = (function() { + + /** + * Properties of a NodeConfigDefaults. + * @memberof google.container.v1 + * @interface INodeConfigDefaults + * @property {google.container.v1.IGcfsConfig|null} [gcfsConfig] NodeConfigDefaults gcfsConfig + * @property {google.container.v1.INodePoolLoggingConfig|null} [loggingConfig] NodeConfigDefaults loggingConfig + * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] NodeConfigDefaults containerdConfig + * @property {google.container.v1.INodeKubeletConfig|null} [nodeKubeletConfig] NodeConfigDefaults nodeKubeletConfig + */ + + /** + * Constructs a new NodeConfigDefaults. + * @memberof google.container.v1 + * @classdesc Represents a NodeConfigDefaults. + * @implements INodeConfigDefaults + * @constructor + * @param {google.container.v1.INodeConfigDefaults=} [properties] Properties to set + */ + function NodeConfigDefaults(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * NodeConfigDefaults gcfsConfig. + * @member {google.container.v1.IGcfsConfig|null|undefined} gcfsConfig + * @memberof google.container.v1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.gcfsConfig = null; + + /** + * NodeConfigDefaults loggingConfig. + * @member {google.container.v1.INodePoolLoggingConfig|null|undefined} loggingConfig + * @memberof google.container.v1.NodeConfigDefaults + * @instance + */ + NodeConfigDefaults.prototype.loggingConfig = null; + + /** + * NodeConfigDefaults containerdConfig. + * @member {google.container.v1.IContainerdConfig|null|undefined} containerdConfig + * @memberof google.container.v1.NodeConfigDefaults * @instance */ NodeConfigDefaults.prototype.containerdConfig = null; @@ -19292,6 +21020,8 @@ * @property {google.container.v1.IIdentityServiceConfig|null} [desiredIdentityServiceConfig] ClusterUpdate desiredIdentityServiceConfig * @property {google.container.v1.IServiceExternalIPsConfig|null} [desiredServiceExternalIpsConfig] ClusterUpdate desiredServiceExternalIpsConfig * @property {boolean|null} [desiredEnablePrivateEndpoint] ClusterUpdate desiredEnablePrivateEndpoint + * @property {boolean|null} [desiredDefaultEnablePrivateNodes] ClusterUpdate desiredDefaultEnablePrivateNodes + * @property {google.container.v1.IControlPlaneEndpointsConfig|null} [desiredControlPlaneEndpointsConfig] ClusterUpdate desiredControlPlaneEndpointsConfig * @property {string|null} [desiredMasterVersion] ClusterUpdate desiredMasterVersion * @property {google.container.v1.IGcfsConfig|null} [desiredGcfsConfig] ClusterUpdate desiredGcfsConfig * @property {google.container.v1.INetworkTags|null} [desiredNodePoolAutoConfigNetworkTags] ClusterUpdate desiredNodePoolAutoConfigNetworkTags @@ -19313,8 +21043,12 @@ * @property {google.container.v1.IResourceManagerTags|null} [desiredNodePoolAutoConfigResourceManagerTags] ClusterUpdate desiredNodePoolAutoConfigResourceManagerTags * @property {google.container.v1.InTransitEncryptionConfig|null} [desiredInTransitEncryptionConfig] ClusterUpdate desiredInTransitEncryptionConfig * @property {boolean|null} [desiredEnableCiliumClusterwideNetworkPolicy] ClusterUpdate desiredEnableCiliumClusterwideNetworkPolicy + * @property {google.container.v1.ISecretManagerConfig|null} [desiredSecretManagerConfig] ClusterUpdate desiredSecretManagerConfig + * @property {google.container.v1.ICompliancePostureConfig|null} [desiredCompliancePostureConfig] ClusterUpdate desiredCompliancePostureConfig * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodeKubeletConfig] ClusterUpdate desiredNodeKubeletConfig * @property {google.container.v1.INodeKubeletConfig|null} [desiredNodePoolAutoConfigKubeletConfig] ClusterUpdate desiredNodePoolAutoConfigKubeletConfig + * @property {google.container.v1.IUserManagedKeysConfig|null} [userManagedKeysConfig] ClusterUpdate userManagedKeysConfig + * @property {google.container.v1.IRBACBindingConfig|null} [desiredRbacBindingConfig] ClusterUpdate desiredRbacBindingConfig */ /** @@ -19597,6 +21331,22 @@ */ ClusterUpdate.prototype.desiredEnablePrivateEndpoint = null; + /** + * ClusterUpdate desiredDefaultEnablePrivateNodes. + * @member {boolean|null|undefined} desiredDefaultEnablePrivateNodes + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredDefaultEnablePrivateNodes = null; + + /** + * ClusterUpdate desiredControlPlaneEndpointsConfig. + * @member {google.container.v1.IControlPlaneEndpointsConfig|null|undefined} desiredControlPlaneEndpointsConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredControlPlaneEndpointsConfig = null; + /** * ClusterUpdate desiredMasterVersion. * @member {string} desiredMasterVersion @@ -19765,6 +21515,22 @@ */ ClusterUpdate.prototype.desiredEnableCiliumClusterwideNetworkPolicy = null; + /** + * ClusterUpdate desiredSecretManagerConfig. + * @member {google.container.v1.ISecretManagerConfig|null|undefined} desiredSecretManagerConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredSecretManagerConfig = null; + + /** + * ClusterUpdate desiredCompliancePostureConfig. + * @member {google.container.v1.ICompliancePostureConfig|null|undefined} desiredCompliancePostureConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredCompliancePostureConfig = null; + /** * ClusterUpdate desiredNodeKubeletConfig. * @member {google.container.v1.INodeKubeletConfig|null|undefined} desiredNodeKubeletConfig @@ -19781,6 +21547,22 @@ */ ClusterUpdate.prototype.desiredNodePoolAutoConfigKubeletConfig = null; + /** + * ClusterUpdate userManagedKeysConfig. + * @member {google.container.v1.IUserManagedKeysConfig|null|undefined} userManagedKeysConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.userManagedKeysConfig = null; + + /** + * ClusterUpdate desiredRbacBindingConfig. + * @member {google.container.v1.IRBACBindingConfig|null|undefined} desiredRbacBindingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + ClusterUpdate.prototype.desiredRbacBindingConfig = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -19795,6 +21577,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * ClusterUpdate _desiredDefaultEnablePrivateNodes. + * @member {"desiredDefaultEnablePrivateNodes"|undefined} _desiredDefaultEnablePrivateNodes + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredDefaultEnablePrivateNodes", { + get: $util.oneOfGetter($oneOfFields = ["desiredDefaultEnablePrivateNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * ClusterUpdate _desiredEnableFqdnNetworkPolicy. * @member {"desiredEnableFqdnNetworkPolicy"|undefined} _desiredEnableFqdnNetworkPolicy @@ -19839,6 +21632,39 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * ClusterUpdate _desiredSecretManagerConfig. + * @member {"desiredSecretManagerConfig"|undefined} _desiredSecretManagerConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredSecretManagerConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredSecretManagerConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredCompliancePostureConfig. + * @member {"desiredCompliancePostureConfig"|undefined} _desiredCompliancePostureConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredCompliancePostureConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredCompliancePostureConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * ClusterUpdate _desiredRbacBindingConfig. + * @member {"desiredRbacBindingConfig"|undefined} _desiredRbacBindingConfig + * @memberof google.container.v1.ClusterUpdate + * @instance + */ + Object.defineProperty(ClusterUpdate.prototype, "_desiredRbacBindingConfig", { + get: $util.oneOfGetter($oneOfFields = ["desiredRbacBindingConfig"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new ClusterUpdate instance using the specified properties. * @function create @@ -19930,6 +21756,10 @@ $root.google.container.v1.MeshCertificates.encode(message.desiredMeshCertificates, writer.uint32(/* id 67, wireType 2 =*/538).fork()).ldelim(); if (message.desiredEnablePrivateEndpoint != null && Object.hasOwnProperty.call(message, "desiredEnablePrivateEndpoint")) writer.uint32(/* id 71, wireType 0 =*/568).bool(message.desiredEnablePrivateEndpoint); + if (message.desiredDefaultEnablePrivateNodes != null && Object.hasOwnProperty.call(message, "desiredDefaultEnablePrivateNodes")) + writer.uint32(/* id 72, wireType 0 =*/576).bool(message.desiredDefaultEnablePrivateNodes); + if (message.desiredControlPlaneEndpointsConfig != null && Object.hasOwnProperty.call(message, "desiredControlPlaneEndpointsConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.encode(message.desiredControlPlaneEndpointsConfig, writer.uint32(/* id 73, wireType 2 =*/586).fork()).ldelim(); if (message.desiredMasterVersion != null && Object.hasOwnProperty.call(message, "desiredMasterVersion")) writer.uint32(/* id 100, wireType 2 =*/802).string(message.desiredMasterVersion); if (message.desiredGcfsConfig != null && Object.hasOwnProperty.call(message, "desiredGcfsConfig")) @@ -19972,10 +21802,18 @@ writer.uint32(/* id 137, wireType 0 =*/1096).int32(message.desiredInTransitEncryptionConfig); if (message.desiredEnableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "desiredEnableCiliumClusterwideNetworkPolicy")) writer.uint32(/* id 138, wireType 0 =*/1104).bool(message.desiredEnableCiliumClusterwideNetworkPolicy); + if (message.desiredSecretManagerConfig != null && Object.hasOwnProperty.call(message, "desiredSecretManagerConfig")) + $root.google.container.v1.SecretManagerConfig.encode(message.desiredSecretManagerConfig, writer.uint32(/* id 139, wireType 2 =*/1114).fork()).ldelim(); + if (message.desiredCompliancePostureConfig != null && Object.hasOwnProperty.call(message, "desiredCompliancePostureConfig")) + $root.google.container.v1.CompliancePostureConfig.encode(message.desiredCompliancePostureConfig, writer.uint32(/* id 140, wireType 2 =*/1122).fork()).ldelim(); if (message.desiredNodeKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodeKubeletConfig")) $root.google.container.v1.NodeKubeletConfig.encode(message.desiredNodeKubeletConfig, writer.uint32(/* id 141, wireType 2 =*/1130).fork()).ldelim(); if (message.desiredNodePoolAutoConfigKubeletConfig != null && Object.hasOwnProperty.call(message, "desiredNodePoolAutoConfigKubeletConfig")) $root.google.container.v1.NodeKubeletConfig.encode(message.desiredNodePoolAutoConfigKubeletConfig, writer.uint32(/* id 142, wireType 2 =*/1138).fork()).ldelim(); + if (message.userManagedKeysConfig != null && Object.hasOwnProperty.call(message, "userManagedKeysConfig")) + $root.google.container.v1.UserManagedKeysConfig.encode(message.userManagedKeysConfig, writer.uint32(/* id 143, wireType 2 =*/1146).fork()).ldelim(); + if (message.desiredRbacBindingConfig != null && Object.hasOwnProperty.call(message, "desiredRbacBindingConfig")) + $root.google.container.v1.RBACBindingConfig.encode(message.desiredRbacBindingConfig, writer.uint32(/* id 144, wireType 2 =*/1154).fork()).ldelim(); return writer; }; @@ -20144,6 +21982,14 @@ message.desiredEnablePrivateEndpoint = reader.bool(); break; } + case 72: { + message.desiredDefaultEnablePrivateNodes = reader.bool(); + break; + } + case 73: { + message.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.decode(reader, reader.uint32()); + break; + } case 100: { message.desiredMasterVersion = reader.string(); break; @@ -20228,6 +22074,14 @@ message.desiredEnableCiliumClusterwideNetworkPolicy = reader.bool(); break; } + case 139: { + message.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.decode(reader, reader.uint32()); + break; + } + case 140: { + message.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.decode(reader, reader.uint32()); + break; + } case 141: { message.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); break; @@ -20236,6 +22090,14 @@ message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.decode(reader, reader.uint32()); break; } + case 143: { + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.decode(reader, reader.uint32()); + break; + } + case 144: { + message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.decode(reader, reader.uint32()); + break; + } default: reader.skipType(tag & 7); break; @@ -20438,6 +22300,16 @@ if (typeof message.desiredEnablePrivateEndpoint !== "boolean") return "desiredEnablePrivateEndpoint: boolean expected"; } + if (message.desiredDefaultEnablePrivateNodes != null && message.hasOwnProperty("desiredDefaultEnablePrivateNodes")) { + properties._desiredDefaultEnablePrivateNodes = 1; + if (typeof message.desiredDefaultEnablePrivateNodes !== "boolean") + return "desiredDefaultEnablePrivateNodes: boolean expected"; + } + if (message.desiredControlPlaneEndpointsConfig != null && message.hasOwnProperty("desiredControlPlaneEndpointsConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.verify(message.desiredControlPlaneEndpointsConfig); + if (error) + return "desiredControlPlaneEndpointsConfig." + error; + } if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) if (!$util.isString(message.desiredMasterVersion)) return "desiredMasterVersion: string expected"; @@ -20549,6 +22421,22 @@ if (typeof message.desiredEnableCiliumClusterwideNetworkPolicy !== "boolean") return "desiredEnableCiliumClusterwideNetworkPolicy: boolean expected"; } + if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { + properties._desiredSecretManagerConfig = 1; + { + var error = $root.google.container.v1.SecretManagerConfig.verify(message.desiredSecretManagerConfig); + if (error) + return "desiredSecretManagerConfig." + error; + } + } + if (message.desiredCompliancePostureConfig != null && message.hasOwnProperty("desiredCompliancePostureConfig")) { + properties._desiredCompliancePostureConfig = 1; + { + var error = $root.google.container.v1.CompliancePostureConfig.verify(message.desiredCompliancePostureConfig); + if (error) + return "desiredCompliancePostureConfig." + error; + } + } if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) { var error = $root.google.container.v1.NodeKubeletConfig.verify(message.desiredNodeKubeletConfig); if (error) @@ -20559,6 +22447,19 @@ if (error) return "desiredNodePoolAutoConfigKubeletConfig." + error; } + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) { + var error = $root.google.container.v1.UserManagedKeysConfig.verify(message.userManagedKeysConfig); + if (error) + return "userManagedKeysConfig." + error; + } + if (message.desiredRbacBindingConfig != null && message.hasOwnProperty("desiredRbacBindingConfig")) { + properties._desiredRbacBindingConfig = 1; + { + var error = $root.google.container.v1.RBACBindingConfig.verify(message.desiredRbacBindingConfig); + if (error) + return "desiredRbacBindingConfig." + error; + } + } return null; }; @@ -20757,6 +22658,13 @@ } if (object.desiredEnablePrivateEndpoint != null) message.desiredEnablePrivateEndpoint = Boolean(object.desiredEnablePrivateEndpoint); + if (object.desiredDefaultEnablePrivateNodes != null) + message.desiredDefaultEnablePrivateNodes = Boolean(object.desiredDefaultEnablePrivateNodes); + if (object.desiredControlPlaneEndpointsConfig != null) { + if (typeof object.desiredControlPlaneEndpointsConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredControlPlaneEndpointsConfig: object expected"); + message.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.fromObject(object.desiredControlPlaneEndpointsConfig); + } if (object.desiredMasterVersion != null) message.desiredMasterVersion = String(object.desiredMasterVersion); if (object.desiredGcfsConfig != null) { @@ -20877,6 +22785,16 @@ } if (object.desiredEnableCiliumClusterwideNetworkPolicy != null) message.desiredEnableCiliumClusterwideNetworkPolicy = Boolean(object.desiredEnableCiliumClusterwideNetworkPolicy); + if (object.desiredSecretManagerConfig != null) { + if (typeof object.desiredSecretManagerConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredSecretManagerConfig: object expected"); + message.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.fromObject(object.desiredSecretManagerConfig); + } + if (object.desiredCompliancePostureConfig != null) { + if (typeof object.desiredCompliancePostureConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredCompliancePostureConfig: object expected"); + message.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.fromObject(object.desiredCompliancePostureConfig); + } if (object.desiredNodeKubeletConfig != null) { if (typeof object.desiredNodeKubeletConfig !== "object") throw TypeError(".google.container.v1.ClusterUpdate.desiredNodeKubeletConfig: object expected"); @@ -20887,6 +22805,16 @@ throw TypeError(".google.container.v1.ClusterUpdate.desiredNodePoolAutoConfigKubeletConfig: object expected"); message.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.fromObject(object.desiredNodePoolAutoConfigKubeletConfig); } + if (object.userManagedKeysConfig != null) { + if (typeof object.userManagedKeysConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.userManagedKeysConfig: object expected"); + message.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.fromObject(object.userManagedKeysConfig); + } + if (object.desiredRbacBindingConfig != null) { + if (typeof object.desiredRbacBindingConfig !== "object") + throw TypeError(".google.container.v1.ClusterUpdate.desiredRbacBindingConfig: object expected"); + message.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.fromObject(object.desiredRbacBindingConfig); + } return message; }; @@ -20937,6 +22865,7 @@ object.desiredMonitoringConfig = null; object.desiredIdentityServiceConfig = null; object.desiredMeshCertificates = null; + object.desiredControlPlaneEndpointsConfig = null; object.desiredMasterVersion = ""; object.desiredGcfsConfig = null; object.desiredNodePoolAutoConfigNetworkTags = null; @@ -20956,6 +22885,7 @@ object.desiredNodePoolAutoConfigResourceManagerTags = null; object.desiredNodeKubeletConfig = null; object.desiredNodePoolAutoConfigKubeletConfig = null; + object.userManagedKeysConfig = null; } if (message.desiredNodeVersion != null && message.hasOwnProperty("desiredNodeVersion")) object.desiredNodeVersion = message.desiredNodeVersion; @@ -21029,6 +22959,13 @@ if (options.oneofs) object._desiredEnablePrivateEndpoint = "desiredEnablePrivateEndpoint"; } + if (message.desiredDefaultEnablePrivateNodes != null && message.hasOwnProperty("desiredDefaultEnablePrivateNodes")) { + object.desiredDefaultEnablePrivateNodes = message.desiredDefaultEnablePrivateNodes; + if (options.oneofs) + object._desiredDefaultEnablePrivateNodes = "desiredDefaultEnablePrivateNodes"; + } + if (message.desiredControlPlaneEndpointsConfig != null && message.hasOwnProperty("desiredControlPlaneEndpointsConfig")) + object.desiredControlPlaneEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.toObject(message.desiredControlPlaneEndpointsConfig, options); if (message.desiredMasterVersion != null && message.hasOwnProperty("desiredMasterVersion")) object.desiredMasterVersion = message.desiredMasterVersion; if (message.desiredGcfsConfig != null && message.hasOwnProperty("desiredGcfsConfig")) @@ -21083,10 +23020,27 @@ if (options.oneofs) object._desiredEnableCiliumClusterwideNetworkPolicy = "desiredEnableCiliumClusterwideNetworkPolicy"; } + if (message.desiredSecretManagerConfig != null && message.hasOwnProperty("desiredSecretManagerConfig")) { + object.desiredSecretManagerConfig = $root.google.container.v1.SecretManagerConfig.toObject(message.desiredSecretManagerConfig, options); + if (options.oneofs) + object._desiredSecretManagerConfig = "desiredSecretManagerConfig"; + } + if (message.desiredCompliancePostureConfig != null && message.hasOwnProperty("desiredCompliancePostureConfig")) { + object.desiredCompliancePostureConfig = $root.google.container.v1.CompliancePostureConfig.toObject(message.desiredCompliancePostureConfig, options); + if (options.oneofs) + object._desiredCompliancePostureConfig = "desiredCompliancePostureConfig"; + } if (message.desiredNodeKubeletConfig != null && message.hasOwnProperty("desiredNodeKubeletConfig")) object.desiredNodeKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.desiredNodeKubeletConfig, options); if (message.desiredNodePoolAutoConfigKubeletConfig != null && message.hasOwnProperty("desiredNodePoolAutoConfigKubeletConfig")) object.desiredNodePoolAutoConfigKubeletConfig = $root.google.container.v1.NodeKubeletConfig.toObject(message.desiredNodePoolAutoConfigKubeletConfig, options); + if (message.userManagedKeysConfig != null && message.hasOwnProperty("userManagedKeysConfig")) + object.userManagedKeysConfig = $root.google.container.v1.UserManagedKeysConfig.toObject(message.userManagedKeysConfig, options); + if (message.desiredRbacBindingConfig != null && message.hasOwnProperty("desiredRbacBindingConfig")) { + object.desiredRbacBindingConfig = $root.google.container.v1.RBACBindingConfig.toObject(message.desiredRbacBindingConfig, options); + if (options.oneofs) + object._desiredRbacBindingConfig = "desiredRbacBindingConfig"; + } return object; }; @@ -23949,6 +25903,7 @@ * @property {google.container.v1.IResourceManagerTags|null} [resourceManagerTags] UpdateNodePoolRequest resourceManagerTags * @property {google.container.v1.IContainerdConfig|null} [containerdConfig] UpdateNodePoolRequest containerdConfig * @property {google.container.v1.NodePool.IQueuedProvisioning|null} [queuedProvisioning] UpdateNodePoolRequest queuedProvisioning + * @property {Array.|null} [storagePools] UpdateNodePoolRequest storagePools */ /** @@ -23962,6 +25917,7 @@ function UpdateNodePoolRequest(properties) { this.locations = []; this.accelerators = []; + this.storagePools = []; if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -24216,6 +26172,14 @@ */ UpdateNodePoolRequest.prototype.queuedProvisioning = null; + /** + * UpdateNodePoolRequest storagePools. + * @member {Array.} storagePools + * @memberof google.container.v1.UpdateNodePoolRequest + * @instance + */ + UpdateNodePoolRequest.prototype.storagePools = $util.emptyArray; + /** * Creates a new UpdateNodePoolRequest instance using the specified properties. * @function create @@ -24304,6 +26268,9 @@ $root.google.container.v1.ContainerdConfig.encode(message.containerdConfig, writer.uint32(/* id 40, wireType 2 =*/322).fork()).ldelim(); if (message.queuedProvisioning != null && Object.hasOwnProperty.call(message, "queuedProvisioning")) $root.google.container.v1.NodePool.QueuedProvisioning.encode(message.queuedProvisioning, writer.uint32(/* id 42, wireType 2 =*/338).fork()).ldelim(); + if (message.storagePools != null && message.storagePools.length) + for (var i = 0; i < message.storagePools.length; ++i) + writer.uint32(/* id 43, wireType 2 =*/346).string(message.storagePools[i]); return writer; }; @@ -24466,6 +26433,12 @@ message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.decode(reader, reader.uint32()); break; } + case 43: { + if (!(message.storagePools && message.storagePools.length)) + message.storagePools = []; + message.storagePools.push(reader.string()); + break; + } default: reader.skipType(tag & 7); break; @@ -24640,6 +26613,13 @@ if (error) return "queuedProvisioning." + error; } + if (message.storagePools != null && message.hasOwnProperty("storagePools")) { + if (!Array.isArray(message.storagePools)) + return "storagePools: array expected"; + for (var i = 0; i < message.storagePools.length; ++i) + if (!$util.isString(message.storagePools[i])) + return "storagePools: string[] expected"; + } return null; }; @@ -24791,6 +26771,13 @@ throw TypeError(".google.container.v1.UpdateNodePoolRequest.queuedProvisioning: object expected"); message.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.fromObject(object.queuedProvisioning); } + if (object.storagePools) { + if (!Array.isArray(object.storagePools)) + throw TypeError(".google.container.v1.UpdateNodePoolRequest.storagePools: array expected"); + message.storagePools = []; + for (var i = 0; i < object.storagePools.length; ++i) + message.storagePools[i] = String(object.storagePools[i]); + } return message; }; @@ -24810,6 +26797,7 @@ if (options.arrays || options.defaults) { object.locations = []; object.accelerators = []; + object.storagePools = []; } if (options.defaults) { object.projectId = ""; @@ -24917,6 +26905,11 @@ object.containerdConfig = $root.google.container.v1.ContainerdConfig.toObject(message.containerdConfig, options); if (message.queuedProvisioning != null && message.hasOwnProperty("queuedProvisioning")) object.queuedProvisioning = $root.google.container.v1.NodePool.QueuedProvisioning.toObject(message.queuedProvisioning, options); + if (message.storagePools && message.storagePools.length) { + object.storagePools = []; + for (var j = 0; j < message.storagePools.length; ++j) + object.storagePools[j] = message.storagePools[j]; + } return object; }; @@ -29639,6 +31632,7 @@ * @property {google.container.v1.ReleaseChannel.Channel|null} [channel] ReleaseChannelConfig channel * @property {string|null} [defaultVersion] ReleaseChannelConfig defaultVersion * @property {Array.|null} [validVersions] ReleaseChannelConfig validVersions + * @property {string|null} [upgradeTargetVersion] ReleaseChannelConfig upgradeTargetVersion */ /** @@ -29681,6 +31675,14 @@ */ ReleaseChannelConfig.prototype.validVersions = $util.emptyArray; + /** + * ReleaseChannelConfig upgradeTargetVersion. + * @member {string} upgradeTargetVersion + * @memberof google.container.v1.ServerConfig.ReleaseChannelConfig + * @instance + */ + ReleaseChannelConfig.prototype.upgradeTargetVersion = ""; + /** * Creates a new ReleaseChannelConfig instance using the specified properties. * @function create @@ -29712,6 +31714,8 @@ if (message.validVersions != null && message.validVersions.length) for (var i = 0; i < message.validVersions.length; ++i) writer.uint32(/* id 4, wireType 2 =*/34).string(message.validVersions[i]); + if (message.upgradeTargetVersion != null && Object.hasOwnProperty.call(message, "upgradeTargetVersion")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.upgradeTargetVersion); return writer; }; @@ -29760,6 +31764,10 @@ message.validVersions.push(reader.string()); break; } + case 5: { + message.upgradeTargetVersion = reader.string(); + break; + } default: reader.skipType(tag & 7); break; @@ -29816,6 +31824,9 @@ if (!$util.isString(message.validVersions[i])) return "validVersions: string[] expected"; } + if (message.upgradeTargetVersion != null && message.hasOwnProperty("upgradeTargetVersion")) + if (!$util.isString(message.upgradeTargetVersion)) + return "upgradeTargetVersion: string expected"; return null; }; @@ -29868,6 +31879,8 @@ for (var i = 0; i < object.validVersions.length; ++i) message.validVersions[i] = String(object.validVersions[i]); } + if (object.upgradeTargetVersion != null) + message.upgradeTargetVersion = String(object.upgradeTargetVersion); return message; }; @@ -29889,6 +31902,7 @@ if (options.defaults) { object.channel = options.enums === String ? "UNSPECIFIED" : 0; object.defaultVersion = ""; + object.upgradeTargetVersion = ""; } if (message.channel != null && message.hasOwnProperty("channel")) object.channel = options.enums === String ? $root.google.container.v1.ReleaseChannel.Channel[message.channel] === undefined ? message.channel : $root.google.container.v1.ReleaseChannel.Channel[message.channel] : message.channel; @@ -29899,6 +31913,8 @@ for (var j = 0; j < message.validVersions.length; ++j) object.validVersions[j] = message.validVersions[j]; } + if (message.upgradeTargetVersion != null && message.hasOwnProperty("upgradeTargetVersion")) + object.upgradeTargetVersion = message.upgradeTargetVersion; return object; }; @@ -42529,6 +44545,7 @@ * @property {boolean|null} [enableFqdnNetworkPolicy] NetworkConfig enableFqdnNetworkPolicy * @property {google.container.v1.InTransitEncryptionConfig|null} [inTransitEncryptionConfig] NetworkConfig inTransitEncryptionConfig * @property {boolean|null} [enableCiliumClusterwideNetworkPolicy] NetworkConfig enableCiliumClusterwideNetworkPolicy + * @property {boolean|null} [defaultEnablePrivateNodes] NetworkConfig defaultEnablePrivateNodes */ /** @@ -42666,6 +44683,14 @@ */ NetworkConfig.prototype.enableCiliumClusterwideNetworkPolicy = null; + /** + * NetworkConfig defaultEnablePrivateNodes. + * @member {boolean|null|undefined} defaultEnablePrivateNodes + * @memberof google.container.v1.NetworkConfig + * @instance + */ + NetworkConfig.prototype.defaultEnablePrivateNodes = null; + // OneOf field names bound to virtual getters and setters var $oneOfFields; @@ -42702,6 +44727,17 @@ set: $util.oneOfSetter($oneOfFields) }); + /** + * NetworkConfig _defaultEnablePrivateNodes. + * @member {"defaultEnablePrivateNodes"|undefined} _defaultEnablePrivateNodes + * @memberof google.container.v1.NetworkConfig + * @instance + */ + Object.defineProperty(NetworkConfig.prototype, "_defaultEnablePrivateNodes", { + get: $util.oneOfGetter($oneOfFields = ["defaultEnablePrivateNodes"]), + set: $util.oneOfSetter($oneOfFields) + }); + /** * Creates a new NetworkConfig instance using the specified properties. * @function create @@ -42756,6 +44792,8 @@ writer.uint32(/* id 20, wireType 0 =*/160).int32(message.inTransitEncryptionConfig); if (message.enableCiliumClusterwideNetworkPolicy != null && Object.hasOwnProperty.call(message, "enableCiliumClusterwideNetworkPolicy")) writer.uint32(/* id 21, wireType 0 =*/168).bool(message.enableCiliumClusterwideNetworkPolicy); + if (message.defaultEnablePrivateNodes != null && Object.hasOwnProperty.call(message, "defaultEnablePrivateNodes")) + writer.uint32(/* id 22, wireType 0 =*/176).bool(message.defaultEnablePrivateNodes); return writer; }; @@ -42850,6 +44888,10 @@ message.enableCiliumClusterwideNetworkPolicy = reader.bool(); break; } + case 22: { + message.defaultEnablePrivateNodes = reader.bool(); + break; + } default: reader.skipType(tag & 7); break; @@ -42966,6 +45008,11 @@ if (typeof message.enableCiliumClusterwideNetworkPolicy !== "boolean") return "enableCiliumClusterwideNetworkPolicy: boolean expected"; } + if (message.defaultEnablePrivateNodes != null && message.hasOwnProperty("defaultEnablePrivateNodes")) { + properties._defaultEnablePrivateNodes = 1; + if (typeof message.defaultEnablePrivateNodes !== "boolean") + return "defaultEnablePrivateNodes: boolean expected"; + } return null; }; @@ -43084,6 +45131,8 @@ } if (object.enableCiliumClusterwideNetworkPolicy != null) message.enableCiliumClusterwideNetworkPolicy = Boolean(object.enableCiliumClusterwideNetworkPolicy); + if (object.defaultEnablePrivateNodes != null) + message.defaultEnablePrivateNodes = Boolean(object.defaultEnablePrivateNodes); return message; }; @@ -43153,6 +45202,11 @@ if (options.oneofs) object._enableCiliumClusterwideNetworkPolicy = "enableCiliumClusterwideNetworkPolicy"; } + if (message.defaultEnablePrivateNodes != null && message.hasOwnProperty("defaultEnablePrivateNodes")) { + object.defaultEnablePrivateNodes = message.defaultEnablePrivateNodes; + if (options.oneofs) + object._defaultEnablePrivateNodes = "defaultEnablePrivateNodes"; + } return object; }; @@ -54673,6 +56727,8 @@ case 3: case 4: case 5: + case 7: + case 8: break; } } @@ -54726,6 +56782,14 @@ case 5: message.enableComponents[i] = 5; break; + case "KCP_SSHD": + case 7: + message.enableComponents[i] = 7; + break; + case "KCP_CONNECTION": + case 8: + message.enableComponents[i] = 8; + break; } } return message; @@ -54790,6 +56854,8 @@ * @property {number} APISERVER=3 APISERVER value * @property {number} SCHEDULER=4 SCHEDULER value * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value + * @property {number} KCP_SSHD=7 KCP_SSHD value + * @property {number} KCP_CONNECTION=8 KCP_CONNECTION value */ LoggingComponentConfig.Component = (function() { var valuesById = {}, values = Object.create(valuesById); @@ -54799,6 +56865,8 @@ values[valuesById[3] = "APISERVER"] = 3; values[valuesById[4] = "SCHEDULER"] = 4; values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; + values[valuesById[7] = "KCP_SSHD"] = 7; + values[valuesById[8] = "KCP_CONNECTION"] = 8; return values; })(); @@ -56498,145 +58566,615 @@ }; /** - * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. + * Creates a plain object from a MonitoringComponentConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {google.container.v1.MonitoringComponentConfig} message MonitoringComponentConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + MonitoringComponentConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.arrays || options.defaults) + object.enableComponents = []; + if (message.enableComponents && message.enableComponents.length) { + object.enableComponents = []; + for (var j = 0; j < message.enableComponents.length; ++j) + object.enableComponents[j] = options.enums === String ? $root.google.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + } + return object; + }; + + /** + * Converts this MonitoringComponentConfig to JSON. + * @function toJSON + * @memberof google.container.v1.MonitoringComponentConfig + * @instance + * @returns {Object.} JSON object + */ + MonitoringComponentConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for MonitoringComponentConfig + * @function getTypeUrl + * @memberof google.container.v1.MonitoringComponentConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + MonitoringComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.MonitoringComponentConfig"; + }; + + /** + * Component enum. + * @name google.container.v1.MonitoringComponentConfig.Component + * @enum {number} + * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value + * @property {number} SYSTEM_COMPONENTS=1 SYSTEM_COMPONENTS value + * @property {number} APISERVER=3 APISERVER value + * @property {number} SCHEDULER=4 SCHEDULER value + * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value + * @property {number} STORAGE=7 STORAGE value + * @property {number} HPA=8 HPA value + * @property {number} POD=9 POD value + * @property {number} DAEMONSET=10 DAEMONSET value + * @property {number} DEPLOYMENT=11 DEPLOYMENT value + * @property {number} STATEFULSET=12 STATEFULSET value + * @property {number} CADVISOR=13 CADVISOR value + * @property {number} KUBELET=14 KUBELET value + * @property {number} DCGM=15 DCGM value + */ + MonitoringComponentConfig.Component = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0; + values[valuesById[1] = "SYSTEM_COMPONENTS"] = 1; + values[valuesById[3] = "APISERVER"] = 3; + values[valuesById[4] = "SCHEDULER"] = 4; + values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; + values[valuesById[7] = "STORAGE"] = 7; + values[valuesById[8] = "HPA"] = 8; + values[valuesById[9] = "POD"] = 9; + values[valuesById[10] = "DAEMONSET"] = 10; + values[valuesById[11] = "DEPLOYMENT"] = 11; + values[valuesById[12] = "STATEFULSET"] = 12; + values[valuesById[13] = "CADVISOR"] = 13; + values[valuesById[14] = "KUBELET"] = 14; + values[valuesById[15] = "DCGM"] = 15; + return values; + })(); + + return MonitoringComponentConfig; + })(); + + /** + * DatapathProvider enum. + * @name google.container.v1.DatapathProvider + * @enum {number} + * @property {number} DATAPATH_PROVIDER_UNSPECIFIED=0 DATAPATH_PROVIDER_UNSPECIFIED value + * @property {number} LEGACY_DATAPATH=1 LEGACY_DATAPATH value + * @property {number} ADVANCED_DATAPATH=2 ADVANCED_DATAPATH value + */ + v1.DatapathProvider = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "DATAPATH_PROVIDER_UNSPECIFIED"] = 0; + values[valuesById[1] = "LEGACY_DATAPATH"] = 1; + values[valuesById[2] = "ADVANCED_DATAPATH"] = 2; + return values; + })(); + + /** + * NodePoolUpdateStrategy enum. + * @name google.container.v1.NodePoolUpdateStrategy + * @enum {number} + * @property {number} NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED=0 NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED value + * @property {number} BLUE_GREEN=2 BLUE_GREEN value + * @property {number} SURGE=3 SURGE value + */ + v1.NodePoolUpdateStrategy = (function() { + var valuesById = {}, values = Object.create(valuesById); + values[valuesById[0] = "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"] = 0; + values[valuesById[2] = "BLUE_GREEN"] = 2; + values[valuesById[3] = "SURGE"] = 3; + return values; + })(); + + v1.ManagedPrometheusConfig = (function() { + + /** + * Properties of a ManagedPrometheusConfig. + * @memberof google.container.v1 + * @interface IManagedPrometheusConfig + * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled + */ + + /** + * Constructs a new ManagedPrometheusConfig. + * @memberof google.container.v1 + * @classdesc Represents a ManagedPrometheusConfig. + * @implements IManagedPrometheusConfig + * @constructor + * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set + */ + function ManagedPrometheusConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * ManagedPrometheusConfig enabled. + * @member {boolean} enabled + * @memberof google.container.v1.ManagedPrometheusConfig + * @instance + */ + ManagedPrometheusConfig.prototype.enabled = false; + + /** + * Creates a new ManagedPrometheusConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig instance + */ + ManagedPrometheusConfig.create = function create(properties) { + return new ManagedPrometheusConfig(properties); + }; + + /** + * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedPrometheusConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedPrometheusConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ManagedPrometheusConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a ManagedPrometheusConfig message. + * @function verify + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + ManagedPrometheusConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.enabled != null && message.hasOwnProperty("enabled")) + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + return null; + }; + + /** + * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + */ + ManagedPrometheusConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ManagedPrometheusConfig) + return object; + var message = new $root.google.container.v1.ManagedPrometheusConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {google.container.v1.ManagedPrometheusConfig} message ManagedPrometheusConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + ManagedPrometheusConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.enabled = false; + if (message.enabled != null && message.hasOwnProperty("enabled")) + object.enabled = message.enabled; + return object; + }; + + /** + * Converts this ManagedPrometheusConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ManagedPrometheusConfig + * @instance + * @returns {Object.} JSON object + */ + ManagedPrometheusConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for ManagedPrometheusConfig + * @function getTypeUrl + * @memberof google.container.v1.ManagedPrometheusConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ManagedPrometheusConfig"; + }; + + return ManagedPrometheusConfig; + })(); + + v1.Fleet = (function() { + + /** + * Properties of a Fleet. + * @memberof google.container.v1 + * @interface IFleet + * @property {string|null} [project] Fleet project + * @property {string|null} [membership] Fleet membership + * @property {boolean|null} [preRegistered] Fleet preRegistered + */ + + /** + * Constructs a new Fleet. + * @memberof google.container.v1 + * @classdesc Represents a Fleet. + * @implements IFleet + * @constructor + * @param {google.container.v1.IFleet=} [properties] Properties to set + */ + function Fleet(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * Fleet project. + * @member {string} project + * @memberof google.container.v1.Fleet + * @instance + */ + Fleet.prototype.project = ""; + + /** + * Fleet membership. + * @member {string} membership + * @memberof google.container.v1.Fleet + * @instance + */ + Fleet.prototype.membership = ""; + + /** + * Fleet preRegistered. + * @member {boolean} preRegistered + * @memberof google.container.v1.Fleet + * @instance + */ + Fleet.prototype.preRegistered = false; + + /** + * Creates a new Fleet instance using the specified properties. + * @function create + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.IFleet=} [properties] Properties to set + * @returns {google.container.v1.Fleet} Fleet instance + */ + Fleet.create = function create(properties) { + return new Fleet(properties); + }; + + /** + * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. + * @function encode + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.IFleet} message Fleet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fleet.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.project != null && Object.hasOwnProperty.call(message, "project")) + writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); + if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.membership); + if (message.preRegistered != null && Object.hasOwnProperty.call(message, "preRegistered")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preRegistered); + return writer; + }; + + /** + * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.Fleet + * @static + * @param {google.container.v1.IFleet} message Fleet message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + Fleet.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a Fleet message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.Fleet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.Fleet} Fleet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fleet.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Fleet(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.project = reader.string(); + break; + } + case 2: { + message.membership = reader.string(); + break; + } + case 3: { + message.preRegistered = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a Fleet message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.Fleet + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.Fleet} Fleet + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + Fleet.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a Fleet message. + * @function verify + * @memberof google.container.v1.Fleet + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + Fleet.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + if (message.project != null && message.hasOwnProperty("project")) + if (!$util.isString(message.project)) + return "project: string expected"; + if (message.membership != null && message.hasOwnProperty("membership")) + if (!$util.isString(message.membership)) + return "membership: string expected"; + if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) + if (typeof message.preRegistered !== "boolean") + return "preRegistered: boolean expected"; + return null; + }; + + /** + * Creates a Fleet message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.Fleet + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.Fleet} Fleet + */ + Fleet.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.Fleet) + return object; + var message = new $root.google.container.v1.Fleet(); + if (object.project != null) + message.project = String(object.project); + if (object.membership != null) + message.membership = String(object.membership); + if (object.preRegistered != null) + message.preRegistered = Boolean(object.preRegistered); + return message; + }; + + /** + * Creates a plain object from a Fleet message. Also converts values to other types if specified. * @function toObject - * @memberof google.container.v1.MonitoringComponentConfig + * @memberof google.container.v1.Fleet * @static - * @param {google.container.v1.MonitoringComponentConfig} message MonitoringComponentConfig + * @param {google.container.v1.Fleet} message Fleet * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - MonitoringComponentConfig.toObject = function toObject(message, options) { + Fleet.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.arrays || options.defaults) - object.enableComponents = []; - if (message.enableComponents && message.enableComponents.length) { - object.enableComponents = []; - for (var j = 0; j < message.enableComponents.length; ++j) - object.enableComponents[j] = options.enums === String ? $root.google.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] === undefined ? message.enableComponents[j] : $root.google.container.v1.MonitoringComponentConfig.Component[message.enableComponents[j]] : message.enableComponents[j]; + if (options.defaults) { + object.project = ""; + object.membership = ""; + object.preRegistered = false; } + if (message.project != null && message.hasOwnProperty("project")) + object.project = message.project; + if (message.membership != null && message.hasOwnProperty("membership")) + object.membership = message.membership; + if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) + object.preRegistered = message.preRegistered; return object; }; /** - * Converts this MonitoringComponentConfig to JSON. + * Converts this Fleet to JSON. * @function toJSON - * @memberof google.container.v1.MonitoringComponentConfig + * @memberof google.container.v1.Fleet * @instance * @returns {Object.} JSON object */ - MonitoringComponentConfig.prototype.toJSON = function toJSON() { + Fleet.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for MonitoringComponentConfig + * Gets the default type url for Fleet * @function getTypeUrl - * @memberof google.container.v1.MonitoringComponentConfig + * @memberof google.container.v1.Fleet * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - MonitoringComponentConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.container.v1.MonitoringComponentConfig"; + return typeUrlPrefix + "/google.container.v1.Fleet"; }; - /** - * Component enum. - * @name google.container.v1.MonitoringComponentConfig.Component - * @enum {number} - * @property {number} COMPONENT_UNSPECIFIED=0 COMPONENT_UNSPECIFIED value - * @property {number} SYSTEM_COMPONENTS=1 SYSTEM_COMPONENTS value - * @property {number} APISERVER=3 APISERVER value - * @property {number} SCHEDULER=4 SCHEDULER value - * @property {number} CONTROLLER_MANAGER=5 CONTROLLER_MANAGER value - * @property {number} STORAGE=7 STORAGE value - * @property {number} HPA=8 HPA value - * @property {number} POD=9 POD value - * @property {number} DAEMONSET=10 DAEMONSET value - * @property {number} DEPLOYMENT=11 DEPLOYMENT value - * @property {number} STATEFULSET=12 STATEFULSET value - * @property {number} CADVISOR=13 CADVISOR value - * @property {number} KUBELET=14 KUBELET value - * @property {number} DCGM=15 DCGM value - */ - MonitoringComponentConfig.Component = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "COMPONENT_UNSPECIFIED"] = 0; - values[valuesById[1] = "SYSTEM_COMPONENTS"] = 1; - values[valuesById[3] = "APISERVER"] = 3; - values[valuesById[4] = "SCHEDULER"] = 4; - values[valuesById[5] = "CONTROLLER_MANAGER"] = 5; - values[valuesById[7] = "STORAGE"] = 7; - values[valuesById[8] = "HPA"] = 8; - values[valuesById[9] = "POD"] = 9; - values[valuesById[10] = "DAEMONSET"] = 10; - values[valuesById[11] = "DEPLOYMENT"] = 11; - values[valuesById[12] = "STATEFULSET"] = 12; - values[valuesById[13] = "CADVISOR"] = 13; - values[valuesById[14] = "KUBELET"] = 14; - values[valuesById[15] = "DCGM"] = 15; - return values; - })(); - - return MonitoringComponentConfig; - })(); - - /** - * DatapathProvider enum. - * @name google.container.v1.DatapathProvider - * @enum {number} - * @property {number} DATAPATH_PROVIDER_UNSPECIFIED=0 DATAPATH_PROVIDER_UNSPECIFIED value - * @property {number} LEGACY_DATAPATH=1 LEGACY_DATAPATH value - * @property {number} ADVANCED_DATAPATH=2 ADVANCED_DATAPATH value - */ - v1.DatapathProvider = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "DATAPATH_PROVIDER_UNSPECIFIED"] = 0; - values[valuesById[1] = "LEGACY_DATAPATH"] = 1; - values[valuesById[2] = "ADVANCED_DATAPATH"] = 2; - return values; + return Fleet; })(); /** - * NodePoolUpdateStrategy enum. - * @name google.container.v1.NodePoolUpdateStrategy + * StackType enum. + * @name google.container.v1.StackType * @enum {number} - * @property {number} NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED=0 NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED value - * @property {number} BLUE_GREEN=2 BLUE_GREEN value - * @property {number} SURGE=3 SURGE value + * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value + * @property {number} IPV4=1 IPV4 value + * @property {number} IPV4_IPV6=2 IPV4_IPV6 value */ - v1.NodePoolUpdateStrategy = (function() { + v1.StackType = (function() { var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "NODE_POOL_UPDATE_STRATEGY_UNSPECIFIED"] = 0; - values[valuesById[2] = "BLUE_GREEN"] = 2; - values[valuesById[3] = "SURGE"] = 3; + values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; + values[valuesById[1] = "IPV4"] = 1; + values[valuesById[2] = "IPV4_IPV6"] = 2; return values; })(); - v1.ManagedPrometheusConfig = (function() { + v1.ControlPlaneEndpointsConfig = (function() { /** - * Properties of a ManagedPrometheusConfig. + * Properties of a ControlPlaneEndpointsConfig. * @memberof google.container.v1 - * @interface IManagedPrometheusConfig - * @property {boolean|null} [enabled] ManagedPrometheusConfig enabled + * @interface IControlPlaneEndpointsConfig + * @property {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null} [dnsEndpointConfig] ControlPlaneEndpointsConfig dnsEndpointConfig + * @property {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null} [ipEndpointsConfig] ControlPlaneEndpointsConfig ipEndpointsConfig */ /** - * Constructs a new ManagedPrometheusConfig. + * Constructs a new ControlPlaneEndpointsConfig. * @memberof google.container.v1 - * @classdesc Represents a ManagedPrometheusConfig. - * @implements IManagedPrometheusConfig + * @classdesc Represents a ControlPlaneEndpointsConfig. + * @implements IControlPlaneEndpointsConfig * @constructor - * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set + * @param {google.container.v1.IControlPlaneEndpointsConfig=} [properties] Properties to set */ - function ManagedPrometheusConfig(properties) { + function ControlPlaneEndpointsConfig(properties) { if (properties) for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) if (properties[keys[i]] != null) @@ -56644,75 +59182,89 @@ } /** - * ManagedPrometheusConfig enabled. - * @member {boolean} enabled - * @memberof google.container.v1.ManagedPrometheusConfig + * ControlPlaneEndpointsConfig dnsEndpointConfig. + * @member {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig|null|undefined} dnsEndpointConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @instance */ - ManagedPrometheusConfig.prototype.enabled = false; + ControlPlaneEndpointsConfig.prototype.dnsEndpointConfig = null; /** - * Creates a new ManagedPrometheusConfig instance using the specified properties. + * ControlPlaneEndpointsConfig ipEndpointsConfig. + * @member {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig|null|undefined} ipEndpointsConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @instance + */ + ControlPlaneEndpointsConfig.prototype.ipEndpointsConfig = null; + + /** + * Creates a new ControlPlaneEndpointsConfig instance using the specified properties. * @function create - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static - * @param {google.container.v1.IManagedPrometheusConfig=} [properties] Properties to set - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig instance + * @param {google.container.v1.IControlPlaneEndpointsConfig=} [properties] Properties to set + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig instance */ - ManagedPrometheusConfig.create = function create(properties) { - return new ManagedPrometheusConfig(properties); + ControlPlaneEndpointsConfig.create = function create(properties) { + return new ControlPlaneEndpointsConfig(properties); }; /** - * Encodes the specified ManagedPrometheusConfig message. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. + * Encodes the specified ControlPlaneEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. * @function encode - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static - * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {google.container.v1.IControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ManagedPrometheusConfig.encode = function encode(message, writer) { + ControlPlaneEndpointsConfig.encode = function encode(message, writer) { if (!writer) writer = $Writer.create(); - if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) - writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.dnsEndpointConfig != null && Object.hasOwnProperty.call(message, "dnsEndpointConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.encode(message.dnsEndpointConfig, writer.uint32(/* id 1, wireType 2 =*/10).fork()).ldelim(); + if (message.ipEndpointsConfig != null && Object.hasOwnProperty.call(message, "ipEndpointsConfig")) + $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.encode(message.ipEndpointsConfig, writer.uint32(/* id 3, wireType 2 =*/26).fork()).ldelim(); return writer; }; /** - * Encodes the specified ManagedPrometheusConfig message, length delimited. Does not implicitly {@link google.container.v1.ManagedPrometheusConfig.verify|verify} messages. + * Encodes the specified ControlPlaneEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.verify|verify} messages. * @function encodeDelimited - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static - * @param {google.container.v1.IManagedPrometheusConfig} message ManagedPrometheusConfig message or plain object to encode + * @param {google.container.v1.IControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig message or plain object to encode * @param {$protobuf.Writer} [writer] Writer to encode to * @returns {$protobuf.Writer} Writer */ - ManagedPrometheusConfig.encodeDelimited = function encodeDelimited(message, writer) { + ControlPlaneEndpointsConfig.encodeDelimited = function encodeDelimited(message, writer) { return this.encode(message, writer).ldelim(); }; /** - * Decodes a ManagedPrometheusConfig message from the specified reader or buffer. + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer. * @function decode - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ManagedPrometheusConfig.decode = function decode(reader, length) { + ControlPlaneEndpointsConfig.decode = function decode(reader, length) { if (!(reader instanceof $Reader)) reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ManagedPrometheusConfig(); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig(); while (reader.pos < end) { var tag = reader.uint32(); switch (tag >>> 3) { case 1: { - message.enabled = reader.bool(); + message.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.decode(reader, reader.uint32()); + break; + } + case 3: { + message.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.decode(reader, reader.uint32()); break; } default: @@ -56724,368 +59276,762 @@ }; /** - * Decodes a ManagedPrometheusConfig message from the specified reader or buffer, length delimited. + * Decodes a ControlPlaneEndpointsConfig message from the specified reader or buffer, length delimited. * @function decodeDelimited - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig * @throws {Error} If the payload is not a reader or valid buffer * @throws {$protobuf.util.ProtocolError} If required fields are missing */ - ManagedPrometheusConfig.decodeDelimited = function decodeDelimited(reader) { + ControlPlaneEndpointsConfig.decodeDelimited = function decodeDelimited(reader) { if (!(reader instanceof $Reader)) reader = new $Reader(reader); return this.decode(reader, reader.uint32()); }; /** - * Verifies a ManagedPrometheusConfig message. + * Verifies a ControlPlaneEndpointsConfig message. * @function verify - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static * @param {Object.} message Plain object to verify * @returns {string|null} `null` if valid, otherwise the reason why it is not */ - ManagedPrometheusConfig.verify = function verify(message) { + ControlPlaneEndpointsConfig.verify = function verify(message) { if (typeof message !== "object" || message === null) return "object expected"; - if (message.enabled != null && message.hasOwnProperty("enabled")) - if (typeof message.enabled !== "boolean") - return "enabled: boolean expected"; + if (message.dnsEndpointConfig != null && message.hasOwnProperty("dnsEndpointConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify(message.dnsEndpointConfig); + if (error) + return "dnsEndpointConfig." + error; + } + if (message.ipEndpointsConfig != null && message.hasOwnProperty("ipEndpointsConfig")) { + var error = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify(message.ipEndpointsConfig); + if (error) + return "ipEndpointsConfig." + error; + } return null; }; /** - * Creates a ManagedPrometheusConfig message from a plain object. Also converts values to their respective internal types. + * Creates a ControlPlaneEndpointsConfig message from a plain object. Also converts values to their respective internal types. * @function fromObject - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static * @param {Object.} object Plain object - * @returns {google.container.v1.ManagedPrometheusConfig} ManagedPrometheusConfig + * @returns {google.container.v1.ControlPlaneEndpointsConfig} ControlPlaneEndpointsConfig */ - ManagedPrometheusConfig.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.ManagedPrometheusConfig) + ControlPlaneEndpointsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig) return object; - var message = new $root.google.container.v1.ManagedPrometheusConfig(); - if (object.enabled != null) - message.enabled = Boolean(object.enabled); + var message = new $root.google.container.v1.ControlPlaneEndpointsConfig(); + if (object.dnsEndpointConfig != null) { + if (typeof object.dnsEndpointConfig !== "object") + throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.dnsEndpointConfig: object expected"); + message.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.fromObject(object.dnsEndpointConfig); + } + if (object.ipEndpointsConfig != null) { + if (typeof object.ipEndpointsConfig !== "object") + throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.ipEndpointsConfig: object expected"); + message.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.fromObject(object.ipEndpointsConfig); + } return message; }; /** - * Creates a plain object from a ManagedPrometheusConfig message. Also converts values to other types if specified. + * Creates a plain object from a ControlPlaneEndpointsConfig message. Also converts values to other types if specified. * @function toObject - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static - * @param {google.container.v1.ManagedPrometheusConfig} message ManagedPrometheusConfig + * @param {google.container.v1.ControlPlaneEndpointsConfig} message ControlPlaneEndpointsConfig * @param {$protobuf.IConversionOptions} [options] Conversion options * @returns {Object.} Plain object */ - ManagedPrometheusConfig.toObject = function toObject(message, options) { + ControlPlaneEndpointsConfig.toObject = function toObject(message, options) { if (!options) options = {}; var object = {}; - if (options.defaults) - object.enabled = false; - if (message.enabled != null && message.hasOwnProperty("enabled")) - object.enabled = message.enabled; + if (options.defaults) { + object.dnsEndpointConfig = null; + object.ipEndpointsConfig = null; + } + if (message.dnsEndpointConfig != null && message.hasOwnProperty("dnsEndpointConfig")) + object.dnsEndpointConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.toObject(message.dnsEndpointConfig, options); + if (message.ipEndpointsConfig != null && message.hasOwnProperty("ipEndpointsConfig")) + object.ipEndpointsConfig = $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.toObject(message.ipEndpointsConfig, options); return object; }; /** - * Converts this ManagedPrometheusConfig to JSON. + * Converts this ControlPlaneEndpointsConfig to JSON. * @function toJSON - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @instance * @returns {Object.} JSON object */ - ManagedPrometheusConfig.prototype.toJSON = function toJSON() { + ControlPlaneEndpointsConfig.prototype.toJSON = function toJSON() { return this.constructor.toObject(this, $protobuf.util.toJSONOptions); }; /** - * Gets the default type url for ManagedPrometheusConfig + * Gets the default type url for ControlPlaneEndpointsConfig * @function getTypeUrl - * @memberof google.container.v1.ManagedPrometheusConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig * @static * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") * @returns {string} The default type url */ - ManagedPrometheusConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + ControlPlaneEndpointsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { if (typeUrlPrefix === undefined) { typeUrlPrefix = "type.googleapis.com"; } - return typeUrlPrefix + "/google.container.v1.ManagedPrometheusConfig"; + return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig"; }; - return ManagedPrometheusConfig; - })(); + ControlPlaneEndpointsConfig.DNSEndpointConfig = (function() { - v1.Fleet = (function() { + /** + * Properties of a DNSEndpointConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @interface IDNSEndpointConfig + * @property {string|null} [endpoint] DNSEndpointConfig endpoint + * @property {boolean|null} [allowExternalTraffic] DNSEndpointConfig allowExternalTraffic + */ - /** - * Properties of a Fleet. - * @memberof google.container.v1 - * @interface IFleet - * @property {string|null} [project] Fleet project - * @property {string|null} [membership] Fleet membership - * @property {boolean|null} [preRegistered] Fleet preRegistered - */ + /** + * Constructs a new DNSEndpointConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @classdesc Represents a DNSEndpointConfig. + * @implements IDNSEndpointConfig + * @constructor + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig=} [properties] Properties to set + */ + function DNSEndpointConfig(properties) { + if (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 Fleet. - * @memberof google.container.v1 - * @classdesc Represents a Fleet. - * @implements IFleet - * @constructor - * @param {google.container.v1.IFleet=} [properties] Properties to set - */ - function Fleet(properties) { - if (properties) - for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) - if (properties[keys[i]] != null) - this[keys[i]] = properties[keys[i]]; - } + /** + * DNSEndpointConfig endpoint. + * @member {string} endpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + */ + DNSEndpointConfig.prototype.endpoint = ""; - /** - * Fleet project. - * @member {string} project - * @memberof google.container.v1.Fleet - * @instance - */ - Fleet.prototype.project = ""; + /** + * DNSEndpointConfig allowExternalTraffic. + * @member {boolean|null|undefined} allowExternalTraffic + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + */ + DNSEndpointConfig.prototype.allowExternalTraffic = null; - /** - * Fleet membership. - * @member {string} membership - * @memberof google.container.v1.Fleet - * @instance - */ - Fleet.prototype.membership = ""; + // OneOf field names bound to virtual getters and setters + var $oneOfFields; - /** - * Fleet preRegistered. - * @member {boolean} preRegistered - * @memberof google.container.v1.Fleet - * @instance - */ - Fleet.prototype.preRegistered = false; + /** + * DNSEndpointConfig _allowExternalTraffic. + * @member {"allowExternalTraffic"|undefined} _allowExternalTraffic + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + */ + Object.defineProperty(DNSEndpointConfig.prototype, "_allowExternalTraffic", { + get: $util.oneOfGetter($oneOfFields = ["allowExternalTraffic"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Creates a new Fleet instance using the specified properties. - * @function create - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.IFleet=} [properties] Properties to set - * @returns {google.container.v1.Fleet} Fleet instance - */ - Fleet.create = function create(properties) { - return new Fleet(properties); - }; + /** + * Creates a new DNSEndpointConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig=} [properties] Properties to set + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig instance + */ + DNSEndpointConfig.create = function create(properties) { + return new DNSEndpointConfig(properties); + }; - /** - * Encodes the specified Fleet message. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. - * @function encode - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.IFleet} message Fleet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fleet.encode = function encode(message, writer) { - if (!writer) - writer = $Writer.create(); - if (message.project != null && Object.hasOwnProperty.call(message, "project")) - writer.uint32(/* id 1, wireType 2 =*/10).string(message.project); - if (message.membership != null && Object.hasOwnProperty.call(message, "membership")) - writer.uint32(/* id 2, wireType 2 =*/18).string(message.membership); - if (message.preRegistered != null && Object.hasOwnProperty.call(message, "preRegistered")) - writer.uint32(/* id 3, wireType 0 =*/24).bool(message.preRegistered); - return writer; - }; + /** + * Encodes the specified DNSEndpointConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig} message DNSEndpointConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSEndpointConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.endpoint != null && Object.hasOwnProperty.call(message, "endpoint")) + writer.uint32(/* id 2, wireType 2 =*/18).string(message.endpoint); + if (message.allowExternalTraffic != null && Object.hasOwnProperty.call(message, "allowExternalTraffic")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.allowExternalTraffic); + return writer; + }; + + /** + * Encodes the specified DNSEndpointConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IDNSEndpointConfig} message DNSEndpointConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + DNSEndpointConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSEndpointConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 2: { + message.endpoint = reader.string(); + break; + } + case 3: { + message.allowExternalTraffic = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a DNSEndpointConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + DNSEndpointConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a DNSEndpointConfig message. + * @function verify + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + DNSEndpointConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + if (!$util.isString(message.endpoint)) + return "endpoint: string expected"; + if (message.allowExternalTraffic != null && message.hasOwnProperty("allowExternalTraffic")) { + properties._allowExternalTraffic = 1; + if (typeof message.allowExternalTraffic !== "boolean") + return "allowExternalTraffic: boolean expected"; + } + return null; + }; + + /** + * Creates a DNSEndpointConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} DNSEndpointConfig + */ + DNSEndpointConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig) + return object; + var message = new $root.google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig(); + if (object.endpoint != null) + message.endpoint = String(object.endpoint); + if (object.allowExternalTraffic != null) + message.allowExternalTraffic = Boolean(object.allowExternalTraffic); + return message; + }; + + /** + * Creates a plain object from a DNSEndpointConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig} message DNSEndpointConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + DNSEndpointConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) + object.endpoint = ""; + if (message.endpoint != null && message.hasOwnProperty("endpoint")) + object.endpoint = message.endpoint; + if (message.allowExternalTraffic != null && message.hasOwnProperty("allowExternalTraffic")) { + object.allowExternalTraffic = message.allowExternalTraffic; + if (options.oneofs) + object._allowExternalTraffic = "allowExternalTraffic"; + } + return object; + }; + + /** + * Converts this DNSEndpointConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @instance + * @returns {Object.} JSON object + */ + DNSEndpointConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for DNSEndpointConfig + * @function getTypeUrl + * @memberof google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + DNSEndpointConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig.DNSEndpointConfig"; + }; + + return DNSEndpointConfig; + })(); + + ControlPlaneEndpointsConfig.IPEndpointsConfig = (function() { + + /** + * Properties of a IPEndpointsConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @interface IIPEndpointsConfig + * @property {boolean|null} [enabled] IPEndpointsConfig enabled + * @property {boolean|null} [enablePublicEndpoint] IPEndpointsConfig enablePublicEndpoint + * @property {boolean|null} [globalAccess] IPEndpointsConfig globalAccess + * @property {google.container.v1.IMasterAuthorizedNetworksConfig|null} [authorizedNetworksConfig] IPEndpointsConfig authorizedNetworksConfig + * @property {string|null} [publicEndpoint] IPEndpointsConfig publicEndpoint + * @property {string|null} [privateEndpoint] IPEndpointsConfig privateEndpoint + * @property {string|null} [privateEndpointSubnetwork] IPEndpointsConfig privateEndpointSubnetwork + */ + + /** + * Constructs a new IPEndpointsConfig. + * @memberof google.container.v1.ControlPlaneEndpointsConfig + * @classdesc Represents a IPEndpointsConfig. + * @implements IIPEndpointsConfig + * @constructor + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig=} [properties] Properties to set + */ + function IPEndpointsConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * IPEndpointsConfig enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.enabled = null; + + /** + * IPEndpointsConfig enablePublicEndpoint. + * @member {boolean|null|undefined} enablePublicEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.enablePublicEndpoint = null; + + /** + * IPEndpointsConfig globalAccess. + * @member {boolean|null|undefined} globalAccess + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.globalAccess = null; + + /** + * IPEndpointsConfig authorizedNetworksConfig. + * @member {google.container.v1.IMasterAuthorizedNetworksConfig|null|undefined} authorizedNetworksConfig + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.authorizedNetworksConfig = null; + + /** + * IPEndpointsConfig publicEndpoint. + * @member {string} publicEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.publicEndpoint = ""; + + /** + * IPEndpointsConfig privateEndpoint. + * @member {string} privateEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.privateEndpoint = ""; + + /** + * IPEndpointsConfig privateEndpointSubnetwork. + * @member {string} privateEndpointSubnetwork + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + IPEndpointsConfig.prototype.privateEndpointSubnetwork = ""; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * IPEndpointsConfig _enabled. + * @member {"enabled"|undefined} _enabled + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + Object.defineProperty(IPEndpointsConfig.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Encodes the specified Fleet message, length delimited. Does not implicitly {@link google.container.v1.Fleet.verify|verify} messages. - * @function encodeDelimited - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.IFleet} message Fleet message or plain object to encode - * @param {$protobuf.Writer} [writer] Writer to encode to - * @returns {$protobuf.Writer} Writer - */ - Fleet.encodeDelimited = function encodeDelimited(message, writer) { - return this.encode(message, writer).ldelim(); - }; + /** + * IPEndpointsConfig _enablePublicEndpoint. + * @member {"enablePublicEndpoint"|undefined} _enablePublicEndpoint + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + Object.defineProperty(IPEndpointsConfig.prototype, "_enablePublicEndpoint", { + get: $util.oneOfGetter($oneOfFields = ["enablePublicEndpoint"]), + set: $util.oneOfSetter($oneOfFields) + }); - /** - * Decodes a Fleet message from the specified reader or buffer. - * @function decode - * @memberof google.container.v1.Fleet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @param {number} [length] Message length if known beforehand - * @returns {google.container.v1.Fleet} Fleet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fleet.decode = function decode(reader, length) { - if (!(reader instanceof $Reader)) - reader = $Reader.create(reader); - var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.Fleet(); - while (reader.pos < end) { - var tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - message.project = reader.string(); - break; - } - case 2: { - message.membership = reader.string(); - break; - } - case 3: { - message.preRegistered = reader.bool(); + /** + * IPEndpointsConfig _globalAccess. + * @member {"globalAccess"|undefined} _globalAccess + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + */ + Object.defineProperty(IPEndpointsConfig.prototype, "_globalAccess", { + get: $util.oneOfGetter($oneOfFields = ["globalAccess"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new IPEndpointsConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig=} [properties] Properties to set + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig instance + */ + IPEndpointsConfig.create = function create(properties) { + return new IPEndpointsConfig(properties); + }; + + /** + * Encodes the specified IPEndpointsConfig message. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig} message IPEndpointsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPEndpointsConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + if (message.enablePublicEndpoint != null && Object.hasOwnProperty.call(message, "enablePublicEndpoint")) + writer.uint32(/* id 2, wireType 0 =*/16).bool(message.enablePublicEndpoint); + if (message.globalAccess != null && Object.hasOwnProperty.call(message, "globalAccess")) + writer.uint32(/* id 3, wireType 0 =*/24).bool(message.globalAccess); + if (message.authorizedNetworksConfig != null && Object.hasOwnProperty.call(message, "authorizedNetworksConfig")) + $root.google.container.v1.MasterAuthorizedNetworksConfig.encode(message.authorizedNetworksConfig, writer.uint32(/* id 4, wireType 2 =*/34).fork()).ldelim(); + if (message.publicEndpoint != null && Object.hasOwnProperty.call(message, "publicEndpoint")) + writer.uint32(/* id 5, wireType 2 =*/42).string(message.publicEndpoint); + if (message.privateEndpoint != null && Object.hasOwnProperty.call(message, "privateEndpoint")) + writer.uint32(/* id 6, wireType 2 =*/50).string(message.privateEndpoint); + if (message.privateEndpointSubnetwork != null && Object.hasOwnProperty.call(message, "privateEndpointSubnetwork")) + writer.uint32(/* id 7, wireType 2 =*/58).string(message.privateEndpointSubnetwork); + return writer; + }; + + /** + * Encodes the specified IPEndpointsConfig message, length delimited. Does not implicitly {@link google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IIPEndpointsConfig} message IPEndpointsConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + IPEndpointsConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPEndpointsConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + case 2: { + message.enablePublicEndpoint = reader.bool(); + break; + } + case 3: { + message.globalAccess = reader.bool(); + break; + } + case 4: { + message.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.decode(reader, reader.uint32()); + break; + } + case 5: { + message.publicEndpoint = reader.string(); + break; + } + case 6: { + message.privateEndpoint = reader.string(); + break; + } + case 7: { + message.privateEndpointSubnetwork = reader.string(); + break; + } + default: + reader.skipType(tag & 7); break; } - default: - reader.skipType(tag & 7); - break; } - } - return message; - }; + return message; + }; - /** - * Decodes a Fleet message from the specified reader or buffer, length delimited. - * @function decodeDelimited - * @memberof google.container.v1.Fleet - * @static - * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from - * @returns {google.container.v1.Fleet} Fleet - * @throws {Error} If the payload is not a reader or valid buffer - * @throws {$protobuf.util.ProtocolError} If required fields are missing - */ - Fleet.decodeDelimited = function decodeDelimited(reader) { - if (!(reader instanceof $Reader)) - reader = new $Reader(reader); - return this.decode(reader, reader.uint32()); - }; + /** + * Decodes a IPEndpointsConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + IPEndpointsConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; - /** - * Verifies a Fleet message. - * @function verify - * @memberof google.container.v1.Fleet - * @static - * @param {Object.} message Plain object to verify - * @returns {string|null} `null` if valid, otherwise the reason why it is not - */ - Fleet.verify = function verify(message) { - if (typeof message !== "object" || message === null) - return "object expected"; - if (message.project != null && message.hasOwnProperty("project")) - if (!$util.isString(message.project)) - return "project: string expected"; - if (message.membership != null && message.hasOwnProperty("membership")) - if (!$util.isString(message.membership)) - return "membership: string expected"; - if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) - if (typeof message.preRegistered !== "boolean") - return "preRegistered: boolean expected"; - return null; - }; + /** + * Verifies a IPEndpointsConfig message. + * @function verify + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + IPEndpointsConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + if (message.enablePublicEndpoint != null && message.hasOwnProperty("enablePublicEndpoint")) { + properties._enablePublicEndpoint = 1; + if (typeof message.enablePublicEndpoint !== "boolean") + return "enablePublicEndpoint: boolean expected"; + } + if (message.globalAccess != null && message.hasOwnProperty("globalAccess")) { + properties._globalAccess = 1; + if (typeof message.globalAccess !== "boolean") + return "globalAccess: boolean expected"; + } + if (message.authorizedNetworksConfig != null && message.hasOwnProperty("authorizedNetworksConfig")) { + var error = $root.google.container.v1.MasterAuthorizedNetworksConfig.verify(message.authorizedNetworksConfig); + if (error) + return "authorizedNetworksConfig." + error; + } + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + if (!$util.isString(message.publicEndpoint)) + return "publicEndpoint: string expected"; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + if (!$util.isString(message.privateEndpoint)) + return "privateEndpoint: string expected"; + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + if (!$util.isString(message.privateEndpointSubnetwork)) + return "privateEndpointSubnetwork: string expected"; + return null; + }; - /** - * Creates a Fleet message from a plain object. Also converts values to their respective internal types. - * @function fromObject - * @memberof google.container.v1.Fleet - * @static - * @param {Object.} object Plain object - * @returns {google.container.v1.Fleet} Fleet - */ - Fleet.fromObject = function fromObject(object) { - if (object instanceof $root.google.container.v1.Fleet) - return object; - var message = new $root.google.container.v1.Fleet(); - if (object.project != null) - message.project = String(object.project); - if (object.membership != null) - message.membership = String(object.membership); - if (object.preRegistered != null) - message.preRegistered = Boolean(object.preRegistered); - return message; - }; + /** + * Creates a IPEndpointsConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} IPEndpointsConfig + */ + IPEndpointsConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig) + return object; + var message = new $root.google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + if (object.enablePublicEndpoint != null) + message.enablePublicEndpoint = Boolean(object.enablePublicEndpoint); + if (object.globalAccess != null) + message.globalAccess = Boolean(object.globalAccess); + if (object.authorizedNetworksConfig != null) { + if (typeof object.authorizedNetworksConfig !== "object") + throw TypeError(".google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig.authorizedNetworksConfig: object expected"); + message.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.fromObject(object.authorizedNetworksConfig); + } + if (object.publicEndpoint != null) + message.publicEndpoint = String(object.publicEndpoint); + if (object.privateEndpoint != null) + message.privateEndpoint = String(object.privateEndpoint); + if (object.privateEndpointSubnetwork != null) + message.privateEndpointSubnetwork = String(object.privateEndpointSubnetwork); + return message; + }; - /** - * Creates a plain object from a Fleet message. Also converts values to other types if specified. - * @function toObject - * @memberof google.container.v1.Fleet - * @static - * @param {google.container.v1.Fleet} message Fleet - * @param {$protobuf.IConversionOptions} [options] Conversion options - * @returns {Object.} Plain object - */ - Fleet.toObject = function toObject(message, options) { - if (!options) - options = {}; - var object = {}; - if (options.defaults) { - object.project = ""; - object.membership = ""; - object.preRegistered = false; - } - if (message.project != null && message.hasOwnProperty("project")) - object.project = message.project; - if (message.membership != null && message.hasOwnProperty("membership")) - object.membership = message.membership; - if (message.preRegistered != null && message.hasOwnProperty("preRegistered")) - object.preRegistered = message.preRegistered; - return object; - }; + /** + * Creates a plain object from a IPEndpointsConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig} message IPEndpointsConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + IPEndpointsConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (options.defaults) { + object.authorizedNetworksConfig = null; + object.publicEndpoint = ""; + object.privateEndpoint = ""; + object.privateEndpointSubnetwork = ""; + } + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + if (message.enablePublicEndpoint != null && message.hasOwnProperty("enablePublicEndpoint")) { + object.enablePublicEndpoint = message.enablePublicEndpoint; + if (options.oneofs) + object._enablePublicEndpoint = "enablePublicEndpoint"; + } + if (message.globalAccess != null && message.hasOwnProperty("globalAccess")) { + object.globalAccess = message.globalAccess; + if (options.oneofs) + object._globalAccess = "globalAccess"; + } + if (message.authorizedNetworksConfig != null && message.hasOwnProperty("authorizedNetworksConfig")) + object.authorizedNetworksConfig = $root.google.container.v1.MasterAuthorizedNetworksConfig.toObject(message.authorizedNetworksConfig, options); + if (message.publicEndpoint != null && message.hasOwnProperty("publicEndpoint")) + object.publicEndpoint = message.publicEndpoint; + if (message.privateEndpoint != null && message.hasOwnProperty("privateEndpoint")) + object.privateEndpoint = message.privateEndpoint; + if (message.privateEndpointSubnetwork != null && message.hasOwnProperty("privateEndpointSubnetwork")) + object.privateEndpointSubnetwork = message.privateEndpointSubnetwork; + return object; + }; - /** - * Converts this Fleet to JSON. - * @function toJSON - * @memberof google.container.v1.Fleet - * @instance - * @returns {Object.} JSON object - */ - Fleet.prototype.toJSON = function toJSON() { - return this.constructor.toObject(this, $protobuf.util.toJSONOptions); - }; + /** + * Converts this IPEndpointsConfig to JSON. + * @function toJSON + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @instance + * @returns {Object.} JSON object + */ + IPEndpointsConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; - /** - * Gets the default type url for Fleet - * @function getTypeUrl - * @memberof google.container.v1.Fleet - * @static - * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") - * @returns {string} The default type url - */ - Fleet.getTypeUrl = function getTypeUrl(typeUrlPrefix) { - if (typeUrlPrefix === undefined) { - typeUrlPrefix = "type.googleapis.com"; - } - return typeUrlPrefix + "/google.container.v1.Fleet"; - }; + /** + * Gets the default type url for IPEndpointsConfig + * @function getTypeUrl + * @memberof google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + IPEndpointsConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.ControlPlaneEndpointsConfig.IPEndpointsConfig"; + }; - return Fleet; - })(); + return IPEndpointsConfig; + })(); - /** - * StackType enum. - * @name google.container.v1.StackType - * @enum {number} - * @property {number} STACK_TYPE_UNSPECIFIED=0 STACK_TYPE_UNSPECIFIED value - * @property {number} IPV4=1 IPV4 value - * @property {number} IPV4_IPV6=2 IPV4_IPV6 value - */ - v1.StackType = (function() { - var valuesById = {}, values = Object.create(valuesById); - values[valuesById[0] = "STACK_TYPE_UNSPECIFIED"] = 0; - values[valuesById[1] = "IPV4"] = 1; - values[valuesById[2] = "IPV4_IPV6"] = 2; - return values; + return ControlPlaneEndpointsConfig; })(); /** @@ -57991,6 +60937,227 @@ return EnterpriseConfig; })(); + v1.SecretManagerConfig = (function() { + + /** + * Properties of a SecretManagerConfig. + * @memberof google.container.v1 + * @interface ISecretManagerConfig + * @property {boolean|null} [enabled] SecretManagerConfig enabled + */ + + /** + * Constructs a new SecretManagerConfig. + * @memberof google.container.v1 + * @classdesc Represents a SecretManagerConfig. + * @implements ISecretManagerConfig + * @constructor + * @param {google.container.v1.ISecretManagerConfig=} [properties] Properties to set + */ + function SecretManagerConfig(properties) { + if (properties) + for (var keys = Object.keys(properties), i = 0; i < keys.length; ++i) + if (properties[keys[i]] != null) + this[keys[i]] = properties[keys[i]]; + } + + /** + * SecretManagerConfig enabled. + * @member {boolean|null|undefined} enabled + * @memberof google.container.v1.SecretManagerConfig + * @instance + */ + SecretManagerConfig.prototype.enabled = null; + + // OneOf field names bound to virtual getters and setters + var $oneOfFields; + + /** + * SecretManagerConfig _enabled. + * @member {"enabled"|undefined} _enabled + * @memberof google.container.v1.SecretManagerConfig + * @instance + */ + Object.defineProperty(SecretManagerConfig.prototype, "_enabled", { + get: $util.oneOfGetter($oneOfFields = ["enabled"]), + set: $util.oneOfSetter($oneOfFields) + }); + + /** + * Creates a new SecretManagerConfig instance using the specified properties. + * @function create + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.ISecretManagerConfig=} [properties] Properties to set + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig instance + */ + SecretManagerConfig.create = function create(properties) { + return new SecretManagerConfig(properties); + }; + + /** + * Encodes the specified SecretManagerConfig message. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @function encode + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerConfig.encode = function encode(message, writer) { + if (!writer) + writer = $Writer.create(); + if (message.enabled != null && Object.hasOwnProperty.call(message, "enabled")) + writer.uint32(/* id 1, wireType 0 =*/8).bool(message.enabled); + return writer; + }; + + /** + * Encodes the specified SecretManagerConfig message, length delimited. Does not implicitly {@link google.container.v1.SecretManagerConfig.verify|verify} messages. + * @function encodeDelimited + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.ISecretManagerConfig} message SecretManagerConfig message or plain object to encode + * @param {$protobuf.Writer} [writer] Writer to encode to + * @returns {$protobuf.Writer} Writer + */ + SecretManagerConfig.encodeDelimited = function encodeDelimited(message, writer) { + return this.encode(message, writer).ldelim(); + }; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer. + * @function decode + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @param {number} [length] Message length if known beforehand + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerConfig.decode = function decode(reader, length) { + if (!(reader instanceof $Reader)) + reader = $Reader.create(reader); + var end = length === undefined ? reader.len : reader.pos + length, message = new $root.google.container.v1.SecretManagerConfig(); + while (reader.pos < end) { + var tag = reader.uint32(); + switch (tag >>> 3) { + case 1: { + message.enabled = reader.bool(); + break; + } + default: + reader.skipType(tag & 7); + break; + } + } + return message; + }; + + /** + * Decodes a SecretManagerConfig message from the specified reader or buffer, length delimited. + * @function decodeDelimited + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {$protobuf.Reader|Uint8Array} reader Reader or buffer to decode from + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig + * @throws {Error} If the payload is not a reader or valid buffer + * @throws {$protobuf.util.ProtocolError} If required fields are missing + */ + SecretManagerConfig.decodeDelimited = function decodeDelimited(reader) { + if (!(reader instanceof $Reader)) + reader = new $Reader(reader); + return this.decode(reader, reader.uint32()); + }; + + /** + * Verifies a SecretManagerConfig message. + * @function verify + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {Object.} message Plain object to verify + * @returns {string|null} `null` if valid, otherwise the reason why it is not + */ + SecretManagerConfig.verify = function verify(message) { + if (typeof message !== "object" || message === null) + return "object expected"; + var properties = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + properties._enabled = 1; + if (typeof message.enabled !== "boolean") + return "enabled: boolean expected"; + } + return null; + }; + + /** + * Creates a SecretManagerConfig message from a plain object. Also converts values to their respective internal types. + * @function fromObject + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {Object.} object Plain object + * @returns {google.container.v1.SecretManagerConfig} SecretManagerConfig + */ + SecretManagerConfig.fromObject = function fromObject(object) { + if (object instanceof $root.google.container.v1.SecretManagerConfig) + return object; + var message = new $root.google.container.v1.SecretManagerConfig(); + if (object.enabled != null) + message.enabled = Boolean(object.enabled); + return message; + }; + + /** + * Creates a plain object from a SecretManagerConfig message. Also converts values to other types if specified. + * @function toObject + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {google.container.v1.SecretManagerConfig} message SecretManagerConfig + * @param {$protobuf.IConversionOptions} [options] Conversion options + * @returns {Object.} Plain object + */ + SecretManagerConfig.toObject = function toObject(message, options) { + if (!options) + options = {}; + var object = {}; + if (message.enabled != null && message.hasOwnProperty("enabled")) { + object.enabled = message.enabled; + if (options.oneofs) + object._enabled = "enabled"; + } + return object; + }; + + /** + * Converts this SecretManagerConfig to JSON. + * @function toJSON + * @memberof google.container.v1.SecretManagerConfig + * @instance + * @returns {Object.} JSON object + */ + SecretManagerConfig.prototype.toJSON = function toJSON() { + return this.constructor.toObject(this, $protobuf.util.toJSONOptions); + }; + + /** + * Gets the default type url for SecretManagerConfig + * @function getTypeUrl + * @memberof google.container.v1.SecretManagerConfig + * @static + * @param {string} [typeUrlPrefix] your custom typeUrlPrefix(default "type.googleapis.com") + * @returns {string} The default type url + */ + SecretManagerConfig.getTypeUrl = function getTypeUrl(typeUrlPrefix) { + if (typeUrlPrefix === undefined) { + typeUrlPrefix = "type.googleapis.com"; + } + return typeUrlPrefix + "/google.container.v1.SecretManagerConfig"; + }; + + return SecretManagerConfig; + })(); + v1.SecondaryBootDisk = (function() { /** diff --git a/packages/google-container/protos/protos.json b/packages/google-container/protos/protos.json index 9c2c9ef0e07..1895850a6ee 100644 --- a/packages/google-container/protos/protos.json +++ b/packages/google-container/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { @@ -13,8 +16,8 @@ "java_package": "com.google.container.v1", "php_namespace": "Google\\Cloud\\Container\\V1", "ruby_package": "Google::Cloud::Container::V1", - "(google.api.resource_definition).type": "pubsub.googleapis.com/Topic", - "(google.api.resource_definition).pattern": "projects/{project}/topics/{topic}" + "(google.api.resource_definition).type": "cloudkms.googleapis.com/CryptoKeyVersion", + "(google.api.resource_definition).pattern": "projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}" }, "nested": { "ClusterManager": { @@ -1179,12 +1182,33 @@ "type": "SecondaryBootDisk", "id": 48 }, + "storagePools": { + "rule": "repeated", + "type": "string", + "id": 49 + }, "secondaryBootDiskUpdateStrategy": { "type": "SecondaryBootDiskUpdateStrategy", "id": 50, "options": { "proto3_optional": true } + }, + "effectiveCgroupMode": { + "type": "EffectiveCgroupMode", + "id": 55, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + } + }, + "nested": { + "EffectiveCgroupMode": { + "values": { + "EFFECTIVE_CGROUP_MODE_UNSPECIFIED": 0, + "EFFECTIVE_CGROUP_MODE_V1": 1, + "EFFECTIVE_CGROUP_MODE_V2": 2 + } } } }, @@ -1674,6 +1698,10 @@ "(google.api.field_behavior)": "OPTIONAL" } }, + "parallelstoreCsiDriverConfig": { + "type": "ParallelstoreCsiDriverConfig", + "id": 19 + }, "rayOperatorConfig": { "type": "RayOperatorConfig", "id": 21, @@ -1735,11 +1763,17 @@ "fields": { "enablePrivateNodes": { "type": "bool", - "id": 1 + "id": 1, + "options": { + "deprecated": true + } }, "enablePrivateEndpoint": { "type": "bool", - "id": 2 + "id": 2, + "options": { + "deprecated": true + } }, "masterIpv4CidrBlock": { "type": "string", @@ -1749,6 +1783,7 @@ "type": "string", "id": 4, "options": { + "deprecated": true, "(google.api.field_behavior)": "OUTPUT_ONLY" } }, @@ -1756,6 +1791,7 @@ "type": "string", "id": 5, "options": { + "deprecated": true, "(google.api.field_behavior)": "OUTPUT_ONLY" } }, @@ -1768,11 +1804,17 @@ }, "masterGlobalAccessConfig": { "type": "PrivateClusterMasterGlobalAccessConfig", - "id": 8 + "id": 8, + "options": { + "deprecated": true + } }, "privateEndpointSubnetwork": { "type": "string", - "id": 10 + "id": 10, + "options": { + "deprecated": true + } } } }, @@ -1841,6 +1883,14 @@ } } }, + "ParallelstoreCsiDriverConfig": { + "fields": { + "enabled": { + "type": "bool", + "id": 1 + } + } + }, "RayOperatorConfig": { "fields": { "enabled": { @@ -1885,6 +1935,11 @@ "oneof": [ "gcpPublicCidrsAccessEnabled" ] + }, + "_privateEndpointEnforcementEnabled": { + "oneof": [ + "privateEndpointEnforcementEnabled" + ] } }, "fields": { @@ -1903,6 +1958,13 @@ "options": { "proto3_optional": true } + }, + "privateEndpointEnforcementEnabled": { + "type": "bool", + "id": 5, + "options": { + "proto3_optional": true + } } }, "nested": { @@ -2101,6 +2163,16 @@ "oneof": [ "satisfiesPzi" ] + }, + "_userManagedKeysConfig": { + "oneof": [ + "userManagedKeysConfig" + ] + }, + "_rbacBindingConfig": { + "oneof": [ + "rbacBindingConfig" + ] } }, "fields": { @@ -2191,7 +2263,10 @@ }, "masterAuthorizedNetworksConfig": { "type": "MasterAuthorizedNetworksConfig", - "id": 22 + "id": 22, + "options": { + "deprecated": true + } }, "maintenancePolicy": { "type": "MaintenancePolicy", @@ -2431,6 +2506,10 @@ "type": "SecurityPostureConfig", "id": 145 }, + "controlPlaneEndpointsConfig": { + "type": "ControlPlaneEndpointsConfig", + "id": 146 + }, "enableK8sBetaApis": { "type": "K8sBetaAPIConfig", "id": 143 @@ -2439,6 +2518,14 @@ "type": "EnterpriseConfig", "id": 149 }, + "secretManagerConfig": { + "type": "SecretManagerConfig", + "id": 150 + }, + "compliancePostureConfig": { + "type": "CompliancePostureConfig", + "id": 151 + }, "satisfiesPzs": { "type": "bool", "id": 152, @@ -2454,6 +2541,20 @@ "(google.api.field_behavior)": "OUTPUT_ONLY", "proto3_optional": true } + }, + "userManagedKeysConfig": { + "type": "UserManagedKeysConfig", + "id": 154, + "options": { + "proto3_optional": true + } + }, + "rbacBindingConfig": { + "type": "RBACBindingConfig", + "id": 156, + "options": { + "proto3_optional": true + } } }, "nested": { @@ -2470,6 +2571,148 @@ } } }, + "RBACBindingConfig": { + "oneofs": { + "_enableInsecureBindingSystemUnauthenticated": { + "oneof": [ + "enableInsecureBindingSystemUnauthenticated" + ] + }, + "_enableInsecureBindingSystemAuthenticated": { + "oneof": [ + "enableInsecureBindingSystemAuthenticated" + ] + } + }, + "fields": { + "enableInsecureBindingSystemUnauthenticated": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "enableInsecureBindingSystemAuthenticated": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + } + } + }, + "UserManagedKeysConfig": { + "fields": { + "clusterCa": { + "type": "string", + "id": 10, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "etcdApiCa": { + "type": "string", + "id": 11, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "etcdPeerCa": { + "type": "string", + "id": 12, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "serviceAccountSigningKeys": { + "rule": "repeated", + "type": "string", + "id": 13, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "serviceAccountVerificationKeys": { + "rule": "repeated", + "type": "string", + "id": 14, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "aggregationCa": { + "type": "string", + "id": 15, + "options": { + "(google.api.resource_reference).type": "privateca.googleapis.com/CaPool" + } + }, + "controlPlaneDiskEncryptionKey": { + "type": "string", + "id": 16, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + }, + "gkeopsEtcdBackupEncryptionKey": { + "type": "string", + "id": 17, + "options": { + "(google.api.resource_reference).type": "cloudkms.googleapis.com/CryptoKeyVersion" + } + } + } + }, + "CompliancePostureConfig": { + "oneofs": { + "_mode": { + "oneof": [ + "mode" + ] + } + }, + "fields": { + "mode": { + "type": "Mode", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "complianceStandards": { + "rule": "repeated", + "type": "ComplianceStandard", + "id": 2 + } + }, + "nested": { + "Mode": { + "values": { + "MODE_UNSPECIFIED": 0, + "DISABLED": 1, + "ENABLED": 2 + } + }, + "ComplianceStandard": { + "oneofs": { + "_standard": { + "oneof": [ + "standard" + ] + } + }, + "fields": { + "standard": { + "type": "string", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + } + } + }, "K8sBetaAPIConfig": { "fields": { "enabledApis": { @@ -2578,6 +2821,11 @@ "desiredEnablePrivateEndpoint" ] }, + "_desiredDefaultEnablePrivateNodes": { + "oneof": [ + "desiredDefaultEnablePrivateNodes" + ] + }, "_desiredEnableFqdnNetworkPolicy": { "oneof": [ "desiredEnableFqdnNetworkPolicy" @@ -2597,6 +2845,21 @@ "oneof": [ "desiredEnableCiliumClusterwideNetworkPolicy" ] + }, + "_desiredSecretManagerConfig": { + "oneof": [ + "desiredSecretManagerConfig" + ] + }, + "_desiredCompliancePostureConfig": { + "oneof": [ + "desiredCompliancePostureConfig" + ] + }, + "_desiredRbacBindingConfig": { + "oneof": [ + "desiredRbacBindingConfig" + ] } }, "fields": { @@ -2655,7 +2918,10 @@ }, "desiredMasterAuthorizedNetworksConfig": { "type": "MasterAuthorizedNetworksConfig", - "id": 12 + "id": 12, + "options": { + "deprecated": true + } }, "desiredClusterAutoscaling": { "type": "ClusterAutoscaling", @@ -2679,7 +2945,10 @@ }, "desiredPrivateClusterConfig": { "type": "PrivateClusterConfig", - "id": 25 + "id": 25, + "options": { + "deprecated": true + } }, "desiredIntraNodeVisibilityConfig": { "type": "IntraNodeVisibilityConfig", @@ -2732,10 +3001,22 @@ "desiredEnablePrivateEndpoint": { "type": "bool", "id": 71, + "options": { + "deprecated": true, + "proto3_optional": true + } + }, + "desiredDefaultEnablePrivateNodes": { + "type": "bool", + "id": 72, "options": { "proto3_optional": true } }, + "desiredControlPlaneEndpointsConfig": { + "type": "ControlPlaneEndpointsConfig", + "id": 73 + }, "desiredMasterVersion": { "type": "string", "id": 100 @@ -2832,6 +3113,20 @@ "proto3_optional": true } }, + "desiredSecretManagerConfig": { + "type": "SecretManagerConfig", + "id": 139, + "options": { + "proto3_optional": true + } + }, + "desiredCompliancePostureConfig": { + "type": "CompliancePostureConfig", + "id": 140, + "options": { + "proto3_optional": true + } + }, "desiredNodeKubeletConfig": { "type": "NodeKubeletConfig", "id": 141 @@ -2839,6 +3134,17 @@ "desiredNodePoolAutoConfigKubeletConfig": { "type": "NodeKubeletConfig", "id": 142 + }, + "userManagedKeysConfig": { + "type": "UserManagedKeysConfig", + "id": 143 + }, + "desiredRbacBindingConfig": { + "type": "RBACBindingConfig", + "id": 144, + "options": { + "proto3_optional": true + } } } }, @@ -3342,6 +3648,11 @@ "queuedProvisioning": { "type": "NodePool.QueuedProvisioning", "id": 42 + }, + "storagePools": { + "rule": "repeated", + "type": "string", + "id": 43 } } }, @@ -3849,6 +4160,10 @@ "rule": "repeated", "type": "string", "id": 4 + }, + "upgradeTargetVersion": { + "type": "string", + "id": 5 } } } @@ -5125,6 +5440,11 @@ "oneof": [ "enableCiliumClusterwideNetworkPolicy" ] + }, + "_defaultEnablePrivateNodes": { + "oneof": [ + "defaultEnablePrivateNodes" + ] } }, "fields": { @@ -5202,6 +5522,13 @@ "options": { "proto3_optional": true } + }, + "defaultEnablePrivateNodes": { + "type": "bool", + "id": 22, + "options": { + "proto3_optional": true + } } }, "nested": { @@ -5997,7 +6324,9 @@ "WORKLOADS": 2, "APISERVER": 3, "SCHEDULER": 4, - "CONTROLLER_MANAGER": 5 + "CONTROLLER_MANAGER": 5, + "KCP_SSHD": 7, + "KCP_CONNECTION": 8 } } } @@ -6175,6 +6504,109 @@ "IPV4_IPV6": 2 } }, + "ControlPlaneEndpointsConfig": { + "fields": { + "dnsEndpointConfig": { + "type": "DNSEndpointConfig", + "id": 1 + }, + "ipEndpointsConfig": { + "type": "IPEndpointsConfig", + "id": 3 + } + }, + "nested": { + "DNSEndpointConfig": { + "oneofs": { + "_allowExternalTraffic": { + "oneof": [ + "allowExternalTraffic" + ] + } + }, + "fields": { + "endpoint": { + "type": "string", + "id": 2, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "allowExternalTraffic": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + } + } + }, + "IPEndpointsConfig": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + }, + "_enablePublicEndpoint": { + "oneof": [ + "enablePublicEndpoint" + ] + }, + "_globalAccess": { + "oneof": [ + "globalAccess" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + }, + "enablePublicEndpoint": { + "type": "bool", + "id": 2, + "options": { + "proto3_optional": true + } + }, + "globalAccess": { + "type": "bool", + "id": 3, + "options": { + "proto3_optional": true + } + }, + "authorizedNetworksConfig": { + "type": "MasterAuthorizedNetworksConfig", + "id": 4 + }, + "publicEndpoint": { + "type": "string", + "id": 5, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "privateEndpoint": { + "type": "string", + "id": 6, + "options": { + "(google.api.field_behavior)": "OUTPUT_ONLY" + } + }, + "privateEndpointSubnetwork": { + "type": "string", + "id": 7 + } + } + } + } + }, "IPv6AccessType": { "values": { "IPV6_ACCESS_TYPE_UNSPECIFIED": 0, @@ -6227,6 +6659,24 @@ } } }, + "SecretManagerConfig": { + "oneofs": { + "_enabled": { + "oneof": [ + "enabled" + ] + } + }, + "fields": { + "enabled": { + "type": "bool", + "id": 1, + "options": { + "proto3_optional": true + } + } + } + }, "SecondaryBootDisk": { "fields": { "mode": { diff --git a/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js b/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js index fca19ba4d00..482516b2a33 100644 --- a/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js +++ b/packages/google-container/samples/generated/v1/cluster_manager.update_node_pool.js @@ -177,6 +177,11 @@ function main(nodeVersion, imageType) { * Specifies the configuration of queued provisioning. */ // const queuedProvisioning = {} + /** + * List of Storage Pools where boot disks are provisioned. + * Existing Storage Pools will be replaced with storage-pools. + */ + // const storagePools = ['abc','def'] // Imports the Container library const {ClusterManagerClient} = require('@google-cloud/container').v1; diff --git a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json index 90265ae94b1..d168af320c5 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json @@ -230,7 +230,7 @@ "segments": [ { "start": 25, - "end": 199, + "end": 204, "type": "FULL" } ], @@ -362,6 +362,10 @@ { "name": "queued_provisioning", "type": ".google.container.v1.NodePool.QueuedProvisioning" + }, + { + "name": "storage_pools", + "type": "TYPE_STRING[]" } ], "resultType": ".google.container.v1.Operation", diff --git a/packages/google-container/src/v1/cluster_manager_client.ts b/packages/google-container/src/v1/cluster_manager_client.ts index d6b90addb44..640807611e8 100644 --- a/packages/google-container/src/v1/cluster_manager_client.ts +++ b/packages/google-container/src/v1/cluster_manager_client.ts @@ -62,6 +62,7 @@ export class ClusterManagerClient { }; warn: (code: string, message: string, warnType?: string) => void; innerApiCalls: {[name: string]: Function}; + pathTemplates: {[name: string]: gax.PathTemplate}; clusterManagerStub?: Promise<{[name: string]: Function}>; /** @@ -194,6 +195,18 @@ export class ClusterManagerClient { // 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 = { + caPoolPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/caPools/{ca_pool}' + ), + cryptoKeyVersionPathTemplate: new this._gaxModule.PathTemplate( + 'projects/{project}/locations/{location}/keyRings/{key_ring}/cryptoKeys/{crypto_key}/cryptoKeyVersions/{crypto_key_version}' + ), + }; + // 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. @@ -924,6 +937,9 @@ export class ClusterManagerClient { * config. * @param {google.container.v1.NodePool.QueuedProvisioning} request.queuedProvisioning * Specifies the configuration of queued provisioning. + * @param {string[]} request.storagePools + * List of Storage Pools where boot disks are provisioned. + * Existing Storage Pools will be replaced with storage-pools. * @param {object} [options] * Call options. See {@link https://googleapis.dev/nodejs/google-gax/latest/interfaces/CallOptions.html|CallOptions} for more details. * @returns {Promise} - The promise which resolves to an array. @@ -4130,6 +4146,149 @@ export class ClusterManagerClient { callSettings ) as AsyncIterable; } + // -------------------- + // -- Path templates -- + // -------------------- + + /** + * Return a fully-qualified caPool resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} ca_pool + * @returns {string} Resource name string. + */ + caPoolPath(project: string, location: string, caPool: string) { + return this.pathTemplates.caPoolPathTemplate.render({ + project: project, + location: location, + ca_pool: caPool, + }); + } + + /** + * Parse the project from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).project; + } + + /** + * Parse the location from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).location; + } + + /** + * Parse the ca_pool from CaPool resource. + * + * @param {string} caPoolName + * A fully-qualified path representing CaPool resource. + * @returns {string} A string representing the ca_pool. + */ + matchCaPoolFromCaPoolName(caPoolName: string) { + return this.pathTemplates.caPoolPathTemplate.match(caPoolName).ca_pool; + } + + /** + * Return a fully-qualified cryptoKeyVersion resource name string. + * + * @param {string} project + * @param {string} location + * @param {string} key_ring + * @param {string} crypto_key + * @param {string} crypto_key_version + * @returns {string} Resource name string. + */ + cryptoKeyVersionPath( + project: string, + location: string, + keyRing: string, + cryptoKey: string, + cryptoKeyVersion: string + ) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.render({ + project: project, + location: location, + key_ring: keyRing, + crypto_key: cryptoKey, + crypto_key_version: cryptoKeyVersion, + }); + } + + /** + * Parse the project from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the project. + */ + matchProjectFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).project; + } + + /** + * Parse the location from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the location. + */ + matchLocationFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).location; + } + + /** + * Parse the key_ring from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the key_ring. + */ + matchKeyRingFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).key_ring; + } + + /** + * Parse the crypto_key from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key. + */ + matchCryptoKeyFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).crypto_key; + } + + /** + * Parse the crypto_key_version from CryptoKeyVersion resource. + * + * @param {string} cryptoKeyVersionName + * A fully-qualified path representing CryptoKeyVersion resource. + * @returns {string} A string representing the crypto_key_version. + */ + matchCryptoKeyVersionFromCryptoKeyVersionName(cryptoKeyVersionName: string) { + return this.pathTemplates.cryptoKeyVersionPathTemplate.match( + cryptoKeyVersionName + ).crypto_key_version; + } /** * Terminate the gRPC channel and close the client. diff --git a/packages/google-container/test/gapic_cluster_manager_v1.ts b/packages/google-container/test/gapic_cluster_manager_v1.ts index 99bacb8e478..e9ff7875d01 100644 --- a/packages/google-container/test/gapic_cluster_manager_v1.ts +++ b/packages/google-container/test/gapic_cluster_manager_v1.ts @@ -6846,4 +6846,162 @@ describe('v1.ClusterManagerClient', () => { ); }); }); + + describe('Path templates', () => { + describe('caPool', () => { + const fakePath = '/rendered/path/caPool'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + ca_pool: 'caPoolValue', + }; + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.caPoolPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.caPoolPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('caPoolPath', () => { + const result = client.caPoolPath( + 'projectValue', + 'locationValue', + 'caPoolValue' + ); + assert.strictEqual(result, fakePath); + assert( + (client.pathTemplates.caPoolPathTemplate.render as SinonStub) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCaPoolName', () => { + const result = client.matchProjectFromCaPoolName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCaPoolName', () => { + const result = client.matchLocationFromCaPoolName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCaPoolFromCaPoolName', () => { + const result = client.matchCaPoolFromCaPoolName(fakePath); + assert.strictEqual(result, 'caPoolValue'); + assert( + (client.pathTemplates.caPoolPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + + describe('cryptoKeyVersion', () => { + const fakePath = '/rendered/path/cryptoKeyVersion'; + const expectedParameters = { + project: 'projectValue', + location: 'locationValue', + key_ring: 'keyRingValue', + crypto_key: 'cryptoKeyValue', + crypto_key_version: 'cryptoKeyVersionValue', + }; + const client = new clustermanagerModule.v1.ClusterManagerClient({ + credentials: {client_email: 'bogus', private_key: 'bogus'}, + projectId: 'bogus', + }); + client.initialize(); + client.pathTemplates.cryptoKeyVersionPathTemplate.render = sinon + .stub() + .returns(fakePath); + client.pathTemplates.cryptoKeyVersionPathTemplate.match = sinon + .stub() + .returns(expectedParameters); + + it('cryptoKeyVersionPath', () => { + const result = client.cryptoKeyVersionPath( + 'projectValue', + 'locationValue', + 'keyRingValue', + 'cryptoKeyValue', + 'cryptoKeyVersionValue' + ); + assert.strictEqual(result, fakePath); + assert( + ( + client.pathTemplates.cryptoKeyVersionPathTemplate + .render as SinonStub + ) + .getCall(-1) + .calledWith(expectedParameters) + ); + }); + + it('matchProjectFromCryptoKeyVersionName', () => { + const result = client.matchProjectFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'projectValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchLocationFromCryptoKeyVersionName', () => { + const result = client.matchLocationFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'locationValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchKeyRingFromCryptoKeyVersionName', () => { + const result = client.matchKeyRingFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'keyRingValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyFromCryptoKeyVersionName', () => { + const result = client.matchCryptoKeyFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + + it('matchCryptoKeyVersionFromCryptoKeyVersionName', () => { + const result = + client.matchCryptoKeyVersionFromCryptoKeyVersionName(fakePath); + assert.strictEqual(result, 'cryptoKeyVersionValue'); + assert( + (client.pathTemplates.cryptoKeyVersionPathTemplate.match as SinonStub) + .getCall(-1) + .calledWith(fakePath) + ); + }); + }); + }); }); From 683839af878fe93ae4c2ce893cddcba4df39914f Mon Sep 17 00:00:00 2001 From: "release-please[bot]" <55107282+release-please[bot]@users.noreply.github.com> Date: Thu, 10 Oct 2024 10:57:22 -0700 Subject: [PATCH 8/8] chore: release main (#5715) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit * chore: release main * 🦉 Updates from OwlBot post-processor See https://github.com/googleapis/repo-automation-bots/blob/main/packages/owl-bot/README.md --------- Co-authored-by: release-please[bot] <55107282+release-please[bot]@users.noreply.github.com> Co-authored-by: Owl Bot --- .release-please-manifest.json | 40 +- changelog.json | 409 +++++++++++++++++- .../google-ai-generativelanguage/CHANGELOG.md | 7 + .../google-ai-generativelanguage/package.json | 2 +- ...adata_google.ai.generativelanguage.v1.json | 2 +- ...a_google.ai.generativelanguage.v1beta.json | 2 +- ....google.ai.generativelanguage.v1beta2.json | 2 +- ..._google.ai.generativelanguage.v1beta2.json | 2 +- ..._google.ai.generativelanguage.v1beta3.json | 2 +- .../samples/package.json | 2 +- packages/google-chat/CHANGELOG.md | 7 + packages/google-chat/package.json | 2 +- .../v1/snippet_metadata_google.chat.v1.json | 2 +- packages/google-chat/samples/package.json | 2 +- packages/google-cloud-aiplatform/CHANGELOG.md | 7 + packages/google-cloud-aiplatform/package.json | 2 +- ...t_metadata.google.cloud.aiplatform.v1.json | 2 +- ...t_metadata_google.cloud.aiplatform.v1.json | 2 +- ...adata.google.cloud.aiplatform.v1beta1.json | 2 +- ...adata_google.cloud.aiplatform.v1beta1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- ...google.cloud.bigquery.datatransfer.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-channel/CHANGELOG.md | 9 + packages/google-cloud-channel/package.json | 2 +- ...ppet_metadata.google.cloud.channel.v1.json | 2 +- ...ppet_metadata_google.cloud.channel.v1.json | 2 +- .../google-cloud-channel/samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...loud.commerce.consumer.procurement.v1.json | 2 +- ...ommerce.consumer.procurement.v1alpha1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 7 + .../package.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- ...google.cloud.contactcenterinsights.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-dataproc/CHANGELOG.md | 7 + packages/google-cloud-dataproc/package.json | 2 +- ...pet_metadata.google.cloud.dataproc.v1.json | 2 +- ...pet_metadata_google.cloud.dataproc.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-deploy/CHANGELOG.md | 7 + packages/google-cloud-deploy/package.json | 2 +- ...ippet_metadata.google.cloud.deploy.v1.json | 2 +- ...ippet_metadata_google.cloud.deploy.v1.json | 2 +- .../google-cloud-deploy/samples/package.json | 2 +- packages/google-cloud-dialogflow/CHANGELOG.md | 7 + packages/google-cloud-dialogflow/package.json | 2 +- ...t_metadata.google.cloud.dialogflow.v2.json | 2 +- ...t_metadata_google.cloud.dialogflow.v2.json | 2 +- ...adata.google.cloud.dialogflow.v2beta1.json | 2 +- ...adata_google.cloud.dialogflow.v2beta1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-documentai/CHANGELOG.md | 7 + packages/google-cloud-documentai/package.json | 2 +- ...t_metadata.google.cloud.documentai.v1.json | 2 +- ...t_metadata_google.cloud.documentai.v1.json | 2 +- ...adata.google.cloud.documentai.v1beta1.json | 2 +- ...adata_google.cloud.documentai.v1beta1.json | 2 +- ...adata.google.cloud.documentai.v1beta2.json | 2 +- ...adata_google.cloud.documentai.v1beta2.json | 2 +- ...adata.google.cloud.documentai.v1beta3.json | 2 +- ...adata_google.cloud.documentai.v1beta3.json | 2 +- .../samples/package.json | 2 +- .../google-cloud-oracledatabase/CHANGELOG.md | 10 + .../google-cloud-oracledatabase/package.json | 2 +- ...tadata_google.cloud.oracledatabase.v1.json | 2 +- .../samples/package.json | 2 +- packages/google-cloud-retail/CHANGELOG.md | 7 + packages/google-cloud-retail/package.json | 2 +- ...ippet_metadata.google.cloud.retail.v2.json | 2 +- ...ippet_metadata_google.cloud.retail.v2.json | 2 +- ..._metadata.google.cloud.retail.v2alpha.json | 2 +- ..._metadata_google.cloud.retail.v2alpha.json | 2 +- ...t_metadata.google.cloud.retail.v2beta.json | 2 +- ...t_metadata_google.cloud.retail.v2beta.json | 2 +- .../google-cloud-retail/samples/package.json | 2 +- packages/google-cloud-tasks/CHANGELOG.md | 7 + packages/google-cloud-tasks/package.json | 2 +- ...nippet_metadata.google.cloud.tasks.v2.json | 2 +- ...nippet_metadata_google.cloud.tasks.v2.json | 2 +- ...t_metadata.google.cloud.tasks.v2beta2.json | 2 +- ...t_metadata_google.cloud.tasks.v2beta2.json | 2 +- ...t_metadata.google.cloud.tasks.v2beta3.json | 2 +- ...t_metadata_google.cloud.tasks.v2beta3.json | 2 +- .../google-cloud-tasks/samples/package.json | 2 +- packages/google-container/CHANGELOG.md | 7 + packages/google-container/package.json | 2 +- .../snippet_metadata.google.container.v1.json | 2 +- .../snippet_metadata_google.container.v1.json | 2 +- ...pet_metadata.google.container.v1beta1.json | 2 +- ...pet_metadata_google.container.v1beta1.json | 2 +- .../google-container/samples/package.json | 2 +- .../google-devtools-cloudbuild/CHANGELOG.md | 7 + packages/google-devtools-cloudbuild/README.md | 4 +- .../google-devtools-cloudbuild/package.json | 2 +- .../protos/protos.json | 3 + ...etadata.google.devtools.cloudbuild.v1.json | 2 +- ...etadata_google.devtools.cloudbuild.v1.json | 2 +- ...etadata.google.devtools.cloudbuild.v2.json | 2 +- ...etadata_google.devtools.cloudbuild.v2.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 8 + .../package.json | 2 +- ...data_google.maps.routeoptimization.v1.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 10 + .../package.json | 2 +- ...oogle.marketingplatform.admin.v1alpha.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 16 + .../package.json | 2 +- ...gle.shopping.merchant.accounts.v1beta.json | 2 +- .../samples/package.json | 2 +- .../CHANGELOG.md | 8 + .../package.json | 2 +- ....shopping.merchant.datasources.v1beta.json | 2 +- .../samples/package.json | 2 +- 123 files changed, 692 insertions(+), 121 deletions(-) create mode 100644 packages/google-cloud-oracledatabase/CHANGELOG.md create mode 100644 packages/google-marketingplatform-admin/CHANGELOG.md diff --git a/.release-please-manifest.json b/.release-please-manifest.json index ea127628704..1cf4fb5f7fe 100644 --- a/.release-please-manifest.json +++ b/.release-please-manifest.json @@ -1,6 +1,6 @@ { "packages/gapic-node-templating": "0.0.0", - "packages/google-ai-generativelanguage": "2.6.0", + "packages/google-ai-generativelanguage": "2.7.0", "packages/google-analytics-admin": "7.6.0", "packages/google-analytics-data": "4.9.0", "packages/google-api-apikeys": "1.3.0", @@ -11,7 +11,7 @@ "packages/google-area120-tables": "3.3.0", "packages/google-cloud-accessapproval": "3.3.0", "packages/google-cloud-advisorynotifications": "1.4.0", - "packages/google-cloud-aiplatform": "3.30.0", + "packages/google-cloud-aiplatform": "3.30.1", "packages/google-cloud-alloydb": "1.9.0", "packages/google-cloud-apigateway": "3.3.0", "packages/google-cloud-apigeeconnect": "3.3.0", @@ -30,21 +30,21 @@ "packages/google-cloud-bigquery-connection": "3.3.0", "packages/google-cloud-bigquery-dataexchange": "1.3.0", "packages/google-cloud-bigquery-datapolicies": "1.4.0", - "packages/google-cloud-bigquery-datatransfer": "4.3.0", + "packages/google-cloud-bigquery-datatransfer": "4.4.0", "packages/google-cloud-bigquery-migration": "1.4.0", "packages/google-cloud-bigquery-reservation": "3.3.0", "packages/google-cloud-billing": "4.5.0", "packages/google-cloud-billing-budgets": "5.4.0", "packages/google-cloud-binaryauthorization": "3.7.0", "packages/google-cloud-certificatemanager": "1.4.0", - "packages/google-cloud-channel": "3.5.0", + "packages/google-cloud-channel": "3.6.0", "packages/google-cloud-clouddms": "3.4.0", - "packages/google-cloud-commerce-consumer-procurement": "0.4.0", + "packages/google-cloud-commerce-consumer-procurement": "0.5.0", "packages/google-cloud-compute": "4.7.0", "packages/google-cloud-confidentialcomputing": "1.6.0", "packages/google-cloud-config": "0.6.0", "packages/google-cloud-connectors": "0.3.0", - "packages/google-cloud-contactcenterinsights": "3.5.0", + "packages/google-cloud-contactcenterinsights": "3.6.0", "packages/google-cloud-contentwarehouse": "1.10.0", "packages/google-cloud-datacatalog": "4.5.0", "packages/google-cloud-datacatalog-lineage": "1.3.0", @@ -52,15 +52,15 @@ "packages/google-cloud-datafusion": "3.2.0", "packages/google-cloud-datalabeling": "4.2.0", "packages/google-cloud-dataplex": "3.11.0", - "packages/google-cloud-dataproc": "5.10.0", + "packages/google-cloud-dataproc": "5.11.0", "packages/google-cloud-dataqna": "3.2.0", "packages/google-cloud-datastream": "3.2.0", - "packages/google-cloud-deploy": "4.0.0", - "packages/google-cloud-dialogflow": "6.9.0", + "packages/google-cloud-deploy": "4.1.0", + "packages/google-cloud-dialogflow": "6.10.0", "packages/google-cloud-dialogflow-cx": "4.8.0", "packages/google-cloud-discoveryengine": "1.14.0", "packages/google-cloud-dns": "4.1.0", - "packages/google-cloud-documentai": "8.10.0", + "packages/google-cloud-documentai": "8.11.0", "packages/google-cloud-domains": "3.2.0", "packages/google-cloud-edgecontainer": "0.4.0", "packages/google-cloud-essentialcontacts": "3.3.0", @@ -107,7 +107,7 @@ "packages/google-cloud-recommender": "6.4.0", "packages/google-cloud-redis": "4.3.0", "packages/google-cloud-resourcemanager": "5.3.0", - "packages/google-cloud-retail": "3.5.0", + "packages/google-cloud-retail": "3.6.0", "packages/google-cloud-run": "1.4.0", "packages/google-cloud-scheduler": "4.3.0", "packages/google-cloud-secretmanager": "5.6.0", @@ -121,7 +121,7 @@ "packages/google-cloud-storageinsights": "1.3.0", "packages/google-cloud-support": "1.3.0", "packages/google-cloud-talent": "6.3.1", - "packages/google-cloud-tasks": "5.5.0", + "packages/google-cloud-tasks": "5.5.1", "packages/google-cloud-texttospeech": "5.4.0", "packages/google-cloud-tpu": "3.5.0", "packages/google-cloud-translate": "8.5.0", @@ -137,10 +137,10 @@ "packages/google-cloud-websecurityscanner": "3.3.0", "packages/google-cloud-workflows-executions": "3.4.0", "packages/google-cloud-workstations": "1.4.0", - "packages/google-container": "5.17.0", + "packages/google-container": "5.18.0", "packages/google-dataflow": "3.3.0", "packages/google-devtools-artifactregistry": "3.4.0", - "packages/google-devtools-cloudbuild": "4.5.0", + "packages/google-devtools-cloudbuild": "4.6.0", "packages/google-devtools-cloudprofiler": "0.6.0", "packages/google-devtools-containeranalysis": "5.6.0", "packages/google-iam": "1.3.0", @@ -167,7 +167,7 @@ "packages/google-cloud-cloudcontrolspartner": "0.3.1", "packages/google-cloud-telcoautomation": "0.3.0", "packages/google-cloud-apphub": "0.3.0", - "packages/google-chat": "0.9.0", + "packages/google-chat": "0.10.0", "packages/google-shopping-merchant-quota": "0.2.0", "packages/google-storage-control": "0.2.0", "packages/google-cloud-backupdr": "0.2.0", @@ -177,17 +177,19 @@ "packages/google-cloud-securitycentermanagement": "0.4.0", "packages/google-shopping-merchant-conversions": "0.2.0", "packages/google-maps-solar": "0.2.0", - "packages/google-maps-routeoptimization": "0.2.0", + "packages/google-maps-routeoptimization": "0.3.0", "packages/google-maps-fleetengine-delivery": "0.1.0", "packages/google-streetview-publish": "0.1.0", "packages/google-maps-fleetengine": "0.1.0", "packages/google-shopping-merchant-promotions": "0.1.0", - "packages/google-shopping-merchant-datasources": "0.1.0", + "packages/google-shopping-merchant-datasources": "0.2.0", "packages/google-cloud-managedkafka": "0.1.0", "packages/google-cloud-developerconnect": "0.1.0", "packages/google-cloud-privilegedaccessmanager": "0.1.0", "packages/google-shopping-merchant-products": "0.1.0", - "packages/google-shopping-merchant-accounts": "0.1.0", + "packages/google-shopping-merchant-accounts": "1.0.0", "packages/google-cloud-gdchardwaremanagement": "0.2.0", - "packages/google-cloud-apihub": "0.1.0" + "packages/google-cloud-apihub": "0.1.0", + "packages/google-marketingplatform-admin": "0.1.0", + "packages/google-cloud-oracledatabase": "0.1.0" } diff --git a/changelog.json b/changelog.json index a2efd1aafa1..223788cdab9 100644 --- a/changelog.json +++ b/changelog.json @@ -1,6 +1,413 @@ { "repository": "googleapis/google-cloud-node", "entries": [ + { + "changes": [ + { + "type": "feat", + "sha": "73973c441885b512790a6a4f6c9a37a09ca8e60c", + "message": "Add initial files for google.cloud.oracledatabase.v1", + "issues": [ + "5727" + ] + }, + { + "type": "feat", + "sha": "a9784ed3db6ee96d171762308bbbcd57390b6866", + "message": "[Many APIs] update Nodejs generator to send API versions in headers for GAPICs", + "issues": [ + "5354" + ] + }, + { + "type": "feat", + "sha": "01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372", + "message": "[Many APIs] update Nodejs generator to send API versions in headers for GAPICs", + "issues": [ + "5351" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/oracledatabase", + "id": "e33d9fc4-6d45-4979-b773-0a64b4b39670", + "createTime": "2024-10-10T01:06:13.413Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "38b46462a436347327f56c81ea3ae8dcbada1c14", + "message": "Add initial files for google.marketingplatform.admin.v1alpha", + "issues": [ + "5716" + ] + }, + { + "type": "feat", + "sha": "a9784ed3db6ee96d171762308bbbcd57390b6866", + "message": "[Many APIs] update Nodejs generator to send API versions in headers for GAPICs", + "issues": [ + "5354" + ] + }, + { + "type": "feat", + "sha": "01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372", + "message": "[Many APIs] update Nodejs generator to send API versions in headers for GAPICs", + "issues": [ + "5351" + ] + } + ], + "version": "0.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ads/marketing-platform-admin", + "id": "c7b3e5e3-65f1-45ad-99d6-9182caa34ce6", + "createTime": "2024-10-10T01:06:13.397Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "e3ff2cc87bbfd68621de91c43e7e90d1248c194d", + "message": "[merchantapi] add 'force' parameter for accounts.delete method", + "issues": [ + "5720" + ] + }, + { + "type": "fix", + "sha": "8928489a31a942397429023dca61da026522856a", + "message": "[merchantapi] The type of an existing field `time_zone` is changed from `message` to `string` in message `.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest`", + "issues": [ + "5714" + ], + "breakingChangeNote": "[merchantapi] The type of an existing field `time_zone` is changed from `message` to `string` in message `.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest` ([#5714](https://github.com/googleapis/google-cloud-node/issues/5714))" + } + ], + "version": "1.0.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/accounts", + "id": "93a0471f-7a48-4a2a-a81d-f15b68e50981", + "createTime": "2024-10-10T01:06:13.381Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3a101aaf6fa743f4f0854973b7a22202fef29f0f", + "message": "[merchantapi] adding some more information about supplemental data sources", + "issues": [ + "5733" + ] + }, + { + "type": "feat", + "sha": "667316b70270f59b10cfb41c687ef9375b683f53", + "message": "[merchantapi] Add FileUploads service", + "issues": [ + "5711" + ] + } + ], + "version": "0.2.0", + "language": "JAVASCRIPT", + "artifactName": "@google-shopping/datasources", + "id": "7cf528df-bad8-4024-909c-d3a9d6bd6312", + "createTime": "2024-10-10T01:06:13.362Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "ade97eddd23ffa8e89526221b564c0eacd3b078e", + "message": "[routeoptimization] Add support for generating route tokens", + "issues": [ + "5706" + ] + }, + { + "type": "feat", + "sha": "ade97eddd23ffa8e89526221b564c0eacd3b078e", + "message": "A new field `route_token` is added to message `.google.maps.routeoptimization.v1.ShipmentRoute.Transition`", + "issues": [] + } + ], + "version": "0.3.0", + "language": "JAVASCRIPT", + "artifactName": "@googlemaps/routeoptimization", + "id": "7159a69e-172a-4504-9f96-43b0a9cbe70d", + "createTime": "2024-10-10T01:06:13.347Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "d5a4a469cfc03b75356e33e9659aa720ff6ee71d", + "message": "[chat] Add doc for permission settings & announcement space support", + "issues": [ + "5731" + ] + } + ], + "version": "0.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-apps/chat", + "id": "05eed183-285c-4144-b52a-a97fb7d4fce6", + "createTime": "2024-10-10T01:06:13.332Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "7cbf6b20d0e4944779ba71aaa3388abbf3840ed5", + "message": "[cloudbuild] Add LEGACY_BUCKET option to DefaultLogsBucketBehavior", + "issues": [ + "5700" + ] + } + ], + "version": "4.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/cloudbuild", + "id": "df3fe3c7-a1fa-4c8c-8895-cce1f1d2e5a5", + "createTime": "2024-10-10T01:06:13.316Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "88083e4a879ef6963eca9183c037ef84b861efed", + "message": "[container] add an effective_cgroup_mode field in node config", + "issues": [ + "5741" + ] + } + ], + "version": "5.18.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/container", + "id": "0ae1a993-c4d7-482e-a3c8-768d41d5705d", + "createTime": "2024-10-10T01:06:13.300Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "4676845917595486602363397352b393eedc587a", + "message": "Remove extra protos file", + "issues": [ + "5696" + ] + } + ], + "version": "5.5.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/tasks", + "id": "9a3c3e4e-970b-49e2-b1bc-07ce129bf35e", + "createTime": "2024-10-10T01:06:13.281Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "1a182cc261b9df04154dfeb123196a539fd25129", + "message": "[retail] add conversational search", + "issues": [ + "5740" + ] + } + ], + "version": "3.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/retail", + "id": "e9e79c3d-160f-4218-ace5-2840a55aebfd", + "createTime": "2024-10-10T01:06:13.266Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "05a5acff50e5fe8cf9d1806dee652d522c88a206", + "message": "[documentai] Removed deprecated api versions", + "issues": [ + "5735" + ] + } + ], + "version": "8.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/documentai", + "id": "267f45ad-6bde-4231-bc08-0172cdcbfa4e", + "createTime": "2024-10-10T01:06:13.250Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "fd737ecc5e6681fbd97d7a20e39cbbdb4ec0595a", + "message": "[dialogflow] created new boolean fields in conversation dataset for zone isolation and zone separation compliance status", + "issues": [ + "5710" + ] + } + ], + "version": "6.10.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dialogflow", + "id": "eb8e4ce4-b137-472b-a789-f7cef026015d", + "createTime": "2024-10-10T01:06:13.234Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8d51ea34e6efd1e88e0394b8e8d9dadf1a37c406", + "message": "[deploy] added support for deploy policies", + "issues": [ + "5717" + ] + } + ], + "version": "4.1.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/deploy", + "id": "2a4b59d8-ea20-46e7-9ee4-95cb17c33775", + "createTime": "2024-10-10T01:06:13.164Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "fe95238882e9c30570e025d11dc3a8ef5d4614a8", + "message": "[dataproc] add support for Spark Connect sessions in Dataproc Serverless for Spark", + "issues": [ + "5709" + ] + } + ], + "version": "5.11.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/dataproc", + "id": "5af692af-4f68-4a88-b2f5-1d72fd154cd8", + "createTime": "2024-10-10T01:06:13.134Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "f3060f2fad34867307825e591ae49ad38c221371", + "message": "[contactcenterinsights] Add import / export IssueModel", + "issues": [ + "5738" + ] + } + ], + "version": "3.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/contact-center-insights", + "id": "00f13d7f-8888-44ba-994a-06d5ead234cb", + "createTime": "2024-10-10T01:06:13.028Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "d0c0db86f34912a0015bc368e2e1299a8dfc2cb8", + "message": "[cloudcommerceconsumerprocurement] add Order modification RPCs and License Management Service", + "issues": [ + "5737" + ] + } + ], + "version": "0.5.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/procurement", + "id": "f1f19979-5b3d-4aab-997e-7334978fdfbf", + "createTime": "2024-10-10T01:06:12.978Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "8c6127917d14c6d06c56f1061a5ac293d333f397", + "message": "[channel] Add support for primary_admin_email as customer_identity for ImportCustomer", + "issues": [ + "5736" + ] + }, + { + "type": "feat", + "sha": "8c6127917d14c6d06c56f1061a5ac293d333f397", + "message": "Add support to look up team customer Cloud Identity information", + "issues": [] + }, + { + "type": "feat", + "sha": "8c6127917d14c6d06c56f1061a5ac293d333f397", + "message": "Add support for importing team customer from a different reseller", + "issues": [] + } + ], + "version": "3.6.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/channel", + "id": "97b098e3-af09-4141-b282-20dd5f9657f3", + "createTime": "2024-10-10T01:06:12.959Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "2f97f7619629efda2977805d8be657fe7ee48e1a", + "message": "[bigquery-datatransfer]Add scheduleOptionsV2 and Error fields for TransferConfig", + "issues": [ + "5722" + ] + } + ], + "version": "4.4.0", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/bigquery-data-transfer", + "id": "e22534ae-b5a7-4681-9ee1-8046fc042431", + "createTime": "2024-10-10T01:06:12.937Z" + }, + { + "changes": [ + { + "type": "fix", + "sha": "183c038dde5d49727ebc066990c3217629d3fa61", + "message": "Annotate PipelineJob and PipelineTaskRerunConfig fields as optional", + "issues": [ + "5698" + ] + } + ], + "version": "3.30.1", + "language": "JAVASCRIPT", + "artifactName": "@google-cloud/aiplatform", + "id": "2918c2db-1722-4ab4-8cb0-64d754b8ed74", + "createTime": "2024-10-10T01:06:12.906Z" + }, + { + "changes": [ + { + "type": "feat", + "sha": "3eb6375a4e4f28565de5e921c33e8547654a0fa2", + "message": "[generativelanguage] Add GoogleSearchRetrieval tool and candidate.grounding_metadata", + "issues": [ + "5699" + ] + } + ], + "version": "2.7.0", + "language": "JAVASCRIPT", + "artifactName": "@google-ai/generativelanguage", + "id": "6c78b347-9c99-41fc-820f-589d0faf192e", + "createTime": "2024-10-10T01:06:12.886Z" + }, { "changes": [ { @@ -36640,5 +37047,5 @@ "createTime": "2023-01-28T04:18:24.718Z" } ], - "updateTime": "2024-09-24T17:54:23.620Z" + "updateTime": "2024-10-10T01:06:13.413Z" } \ No newline at end of file diff --git a/packages/google-ai-generativelanguage/CHANGELOG.md b/packages/google-ai-generativelanguage/CHANGELOG.md index e6813bc0495..2badb617d24 100644 --- a/packages/google-ai-generativelanguage/CHANGELOG.md +++ b/packages/google-ai-generativelanguage/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [2.7.0](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v2.6.0...generativelanguage-v2.7.0) (2024-10-10) + + +### Features + +* [generativelanguage] Add GoogleSearchRetrieval tool and candidate.grounding_metadata ([#5699](https://github.com/googleapis/google-cloud-node/issues/5699)) ([3eb6375](https://github.com/googleapis/google-cloud-node/commit/3eb6375a4e4f28565de5e921c33e8547654a0fa2)) + ## [2.6.0](https://github.com/googleapis/google-cloud-node/compare/generativelanguage-v2.5.0...generativelanguage-v2.6.0) (2024-06-26) diff --git a/packages/google-ai-generativelanguage/package.json b/packages/google-ai-generativelanguage/package.json index d968fbdbe30..dabdbbda5bc 100644 --- a/packages/google-ai-generativelanguage/package.json +++ b/packages/google-ai-generativelanguage/package.json @@ -1,6 +1,6 @@ { "name": "@google-ai/generativelanguage", - "version": "2.6.0", + "version": "2.7.0", "description": "Generative Language API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json b/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json index b5f984118e6..c631166ae4b 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1/snippet_metadata_google.ai.generativelanguage.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.6.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json index 4bfe76bf3c2..4af35f2d7b4 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta/snippet_metadata_google.ai.generativelanguage.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.6.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json index c193d5820e2..33d69642435 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata.google.ai.generativelanguage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.6.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json index c193d5820e2..33d69642435 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta2/snippet_metadata_google.ai.generativelanguage.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.6.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json b/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json index 799a79ce4df..c4eeebebfbd 100644 --- a/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json +++ b/packages/google-ai-generativelanguage/samples/generated/v1beta3/snippet_metadata_google.ai.generativelanguage.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-generativelanguage", - "version": "2.6.0", + "version": "2.7.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-ai-generativelanguage/samples/package.json b/packages/google-ai-generativelanguage/samples/package.json index 342a51957d9..2c1a77aa474 100644 --- a/packages/google-ai-generativelanguage/samples/package.json +++ b/packages/google-ai-generativelanguage/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ai/generativelanguage": "^2.6.0" + "@google-ai/generativelanguage": "^2.7.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-chat/CHANGELOG.md b/packages/google-chat/CHANGELOG.md index 759ee375701..7670b076b3c 100644 --- a/packages/google-chat/CHANGELOG.md +++ b/packages/google-chat/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.10.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.9.0...chat-v0.10.0) (2024-10-10) + + +### Features + +* [chat] Add doc for permission settings & announcement space support ([#5731](https://github.com/googleapis/google-cloud-node/issues/5731)) ([d5a4a46](https://github.com/googleapis/google-cloud-node/commit/d5a4a469cfc03b75356e33e9659aa720ff6ee71d)) + ## [0.9.0](https://github.com/googleapis/google-cloud-node/compare/chat-v0.8.0...chat-v0.9.0) (2024-09-13) diff --git a/packages/google-chat/package.json b/packages/google-chat/package.json index 4774dce0b78..14dd90c09df 100644 --- a/packages/google-chat/package.json +++ b/packages/google-chat/package.json @@ -1,6 +1,6 @@ { "name": "@google-apps/chat", - "version": "0.9.0", + "version": "0.10.0", "description": "Google Chat API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json index 9da6adbeb00..724392e505b 100644 --- a/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json +++ b/packages/google-chat/samples/generated/v1/snippet_metadata_google.chat.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-chat", - "version": "0.9.0", + "version": "0.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-chat/samples/package.json b/packages/google-chat/samples/package.json index cc60ddda427..adc6880a454 100644 --- a/packages/google-chat/samples/package.json +++ b/packages/google-chat/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-apps/chat": "^0.9.0" + "@google-apps/chat": "^0.10.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-aiplatform/CHANGELOG.md b/packages/google-cloud-aiplatform/CHANGELOG.md index d57e47979a5..00257adb398 100644 --- a/packages/google-cloud-aiplatform/CHANGELOG.md +++ b/packages/google-cloud-aiplatform/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.30.1](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v3.30.0...aiplatform-v3.30.1) (2024-10-10) + + +### Bug Fixes + +* Annotate PipelineJob and PipelineTaskRerunConfig fields as optional ([#5698](https://github.com/googleapis/google-cloud-node/issues/5698)) ([183c038](https://github.com/googleapis/google-cloud-node/commit/183c038dde5d49727ebc066990c3217629d3fa61)) + ## [3.30.0](https://github.com/googleapis/google-cloud-node/compare/aiplatform-v3.29.0...aiplatform-v3.30.0) (2024-09-24) diff --git a/packages/google-cloud-aiplatform/package.json b/packages/google-cloud-aiplatform/package.json index d9abf82c988..b0502dd6b02 100644 --- a/packages/google-cloud-aiplatform/package.json +++ b/packages/google-cloud-aiplatform/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/aiplatform", - "version": "3.30.0", + "version": "3.30.1", "description": "Vertex AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json index 1dc868277c4..7ec6143ca21 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata.google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.30.0", + "version": "3.30.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json index 24b3dcd3579..959a07f4070 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1/snippet_metadata_google.cloud.aiplatform.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.30.0", + "version": "3.30.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json index f509d1a70a1..add8137d363 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata.google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.30.0", + "version": "3.30.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json index 002b6006b29..892cf9aad31 100644 --- a/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json +++ b/packages/google-cloud-aiplatform/samples/generated/v1beta1/snippet_metadata_google.cloud.aiplatform.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-aiplatform", - "version": "3.30.0", + "version": "3.30.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-aiplatform/samples/package.json b/packages/google-cloud-aiplatform/samples/package.json index 22eff051e12..a2272d5c7f1 100644 --- a/packages/google-cloud-aiplatform/samples/package.json +++ b/packages/google-cloud-aiplatform/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha --timeout 1200000 test/*.js" }, "dependencies": { - "@google-cloud/aiplatform": "^3.30.0" + "@google-cloud/aiplatform": "^3.30.1" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md b/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md index df48df0c300..1d268f928f7 100644 --- a/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md +++ b/packages/google-cloud-bigquery-datatransfer/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/bigquery-data-transfer?activeTab=versions +## [4.4.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-data-transfer-v4.3.0...bigquery-data-transfer-v4.4.0) (2024-10-10) + + +### Features + +* [bigquery-datatransfer]Add scheduleOptionsV2 and Error fields for TransferConfig ([#5722](https://github.com/googleapis/google-cloud-node/issues/5722)) ([2f97f76](https://github.com/googleapis/google-cloud-node/commit/2f97f7619629efda2977805d8be657fe7ee48e1a)) + ## [4.3.0](https://github.com/googleapis/google-cloud-node/compare/bigquery-data-transfer-v4.2.1...bigquery-data-transfer-v4.3.0) (2024-05-21) diff --git a/packages/google-cloud-bigquery-datatransfer/package.json b/packages/google-cloud-bigquery-datatransfer/package.json index c3f98ae1e3e..e92669e6ed4 100644 --- a/packages/google-cloud-bigquery-datatransfer/package.json +++ b/packages/google-cloud-bigquery-datatransfer/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/bigquery-data-transfer", "description": "BigQuery Data Transfer API client for Node.js", - "version": "4.3.0", + "version": "4.4.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json index dd5a7af04fa..c4f6f6f2893 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata.google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "4.3.0", + "version": "4.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json index 6c3b1801e9e..c55154ecedd 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/generated/v1/snippet_metadata_google.cloud.bigquery.datatransfer.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datatransfer", - "version": "4.3.0", + "version": "4.4.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-bigquery-datatransfer/samples/package.json b/packages/google-cloud-bigquery-datatransfer/samples/package.json index 1f3ef56bc95..ef1afb6cd81 100644 --- a/packages/google-cloud-bigquery-datatransfer/samples/package.json +++ b/packages/google-cloud-bigquery-datatransfer/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha --timeout 60000" }, "dependencies": { - "@google-cloud/bigquery-data-transfer": "^4.3.0" + "@google-cloud/bigquery-data-transfer": "^4.4.0" }, "devDependencies": { "chai": "^4.2.0", diff --git a/packages/google-cloud-channel/CHANGELOG.md b/packages/google-cloud-channel/CHANGELOG.md index 020fcac98b8..5ced426264b 100644 --- a/packages/google-cloud-channel/CHANGELOG.md +++ b/packages/google-cloud-channel/CHANGELOG.md @@ -1,5 +1,14 @@ # Changelog +## [3.6.0](https://github.com/googleapis/google-cloud-node/compare/channel-v3.5.0...channel-v3.6.0) (2024-10-10) + + +### Features + +* [channel] Add support for primary_admin_email as customer_identity for ImportCustomer ([#5736](https://github.com/googleapis/google-cloud-node/issues/5736)) ([8c61279](https://github.com/googleapis/google-cloud-node/commit/8c6127917d14c6d06c56f1061a5ac293d333f397)) +* Add support for importing team customer from a different reseller ([8c61279](https://github.com/googleapis/google-cloud-node/commit/8c6127917d14c6d06c56f1061a5ac293d333f397)) +* Add support to look up team customer Cloud Identity information ([8c61279](https://github.com/googleapis/google-cloud-node/commit/8c6127917d14c6d06c56f1061a5ac293d333f397)) + ## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/channel-v3.4.0...channel-v3.5.0) (2024-05-21) diff --git a/packages/google-cloud-channel/package.json b/packages/google-cloud-channel/package.json index a1cc405fc33..d8ca87f3210 100644 --- a/packages/google-cloud-channel/package.json +++ b/packages/google-cloud-channel/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/channel", - "version": "3.5.0", + "version": "3.6.0", "description": "Channel client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json index 6dffff45264..be4bbe8a224 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata.google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json index e2406984760..bf6359357ee 100644 --- a/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json +++ b/packages/google-cloud-channel/samples/generated/v1/snippet_metadata_google.cloud.channel.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-channel", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-channel/samples/package.json b/packages/google-cloud-channel/samples/package.json index f157afe94c3..519e8535187 100644 --- a/packages/google-cloud-channel/samples/package.json +++ b/packages/google-cloud-channel/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/channel": "^3.5.0", + "@google-cloud/channel": "^3.6.0", "@google-cloud/local-auth": "^3.0.0", "google-auth-library": "^9.0.0", "google-gax": "^3.0.0", diff --git a/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md b/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md index 933f49df39d..4535291a021 100644 --- a/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md +++ b/packages/google-cloud-commerce-consumer-procurement/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [0.5.0](https://github.com/googleapis/google-cloud-node/compare/procurement-v0.4.0...procurement-v0.5.0) (2024-10-10) + + +### Features + +* [cloudcommerceconsumerprocurement] add Order modification RPCs and License Management Service ([#5737](https://github.com/googleapis/google-cloud-node/issues/5737)) ([d0c0db8](https://github.com/googleapis/google-cloud-node/commit/d0c0db86f34912a0015bc368e2e1299a8dfc2cb8)) + ## [0.4.0](https://github.com/googleapis/google-cloud-node/compare/procurement-v0.3.0...procurement-v0.4.0) (2024-05-21) diff --git a/packages/google-cloud-commerce-consumer-procurement/package.json b/packages/google-cloud-commerce-consumer-procurement/package.json index c153fff1980..a2f8d21fa8b 100644 --- a/packages/google-cloud-commerce-consumer-procurement/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/procurement", - "version": "0.4.0", + "version": "0.5.0", "description": "Cloud Commerce Consumer Procurement API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json index 4d03e85b8b1..c078ac90dbf 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-procurement", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json index d6451c50094..0bbbed6f7b3 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/generated/v1alpha1/snippet_metadata_google.cloud.commerce.consumer.procurement.v1alpha1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-procurement", - "version": "0.4.0", + "version": "0.5.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-commerce-consumer-procurement/samples/package.json b/packages/google-cloud-commerce-consumer-procurement/samples/package.json index 34f6ee53006..7ccce482fda 100644 --- a/packages/google-cloud-commerce-consumer-procurement/samples/package.json +++ b/packages/google-cloud-commerce-consumer-procurement/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/procurement": "^0.4.0" + "@google-cloud/procurement": "^0.5.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-contactcenterinsights/CHANGELOG.md b/packages/google-cloud-contactcenterinsights/CHANGELOG.md index 55c702c8e09..43882b1c813 100644 --- a/packages/google-cloud-contactcenterinsights/CHANGELOG.md +++ b/packages/google-cloud-contactcenterinsights/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.6.0](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v3.5.0...contact-center-insights-v3.6.0) (2024-10-10) + + +### Features + +* [contactcenterinsights] Add import / export IssueModel ([#5738](https://github.com/googleapis/google-cloud-node/issues/5738)) ([f3060f2](https://github.com/googleapis/google-cloud-node/commit/f3060f2fad34867307825e591ae49ad38c221371)) + ## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/contact-center-insights-v3.4.0...contact-center-insights-v3.5.0) (2024-05-21) diff --git a/packages/google-cloud-contactcenterinsights/package.json b/packages/google-cloud-contactcenterinsights/package.json index c6a5be104e2..cc6a3e1d0ce 100644 --- a/packages/google-cloud-contactcenterinsights/package.json +++ b/packages/google-cloud-contactcenterinsights/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/contact-center-insights", - "version": "3.5.0", + "version": "3.6.0", "description": "contactcenterinsights client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json index 0b4e507649f..e3eb3e82619 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata.google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json index ce288bd2ae9..03c229302cd 100644 --- a/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json +++ b/packages/google-cloud-contactcenterinsights/samples/generated/v1/snippet_metadata_google.cloud.contactcenterinsights.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-contactcenterinsights", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-contactcenterinsights/samples/package.json b/packages/google-cloud-contactcenterinsights/samples/package.json index 18efcdbedcc..79c42a7201c 100644 --- a/packages/google-cloud-contactcenterinsights/samples/package.json +++ b/packages/google-cloud-contactcenterinsights/samples/package.json @@ -14,7 +14,7 @@ }, "dependencies": { "@google-cloud/bigquery": "^7.0.0", - "@google-cloud/contact-center-insights": "^3.5.0", + "@google-cloud/contact-center-insights": "^3.6.0", "@google-cloud/pubsub": "^4.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-dataproc/CHANGELOG.md b/packages/google-cloud-dataproc/CHANGELOG.md index 1f69bf6c7af..7dde4b16f11 100644 --- a/packages/google-cloud-dataproc/CHANGELOG.md +++ b/packages/google-cloud-dataproc/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/dataproc?activeTab=versions +## [5.11.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-v5.10.0...dataproc-v5.11.0) (2024-10-10) + + +### Features + +* [dataproc] add support for Spark Connect sessions in Dataproc Serverless for Spark ([#5709](https://github.com/googleapis/google-cloud-node/issues/5709)) ([fe95238](https://github.com/googleapis/google-cloud-node/commit/fe95238882e9c30570e025d11dc3a8ef5d4614a8)) + ## [5.10.0](https://github.com/googleapis/google-cloud-node/compare/dataproc-v5.9.0...dataproc-v5.10.0) (2024-09-24) diff --git a/packages/google-cloud-dataproc/package.json b/packages/google-cloud-dataproc/package.json index a9bdbb27753..3fd375f461c 100644 --- a/packages/google-cloud-dataproc/package.json +++ b/packages/google-cloud-dataproc/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dataproc", "description": "Google Cloud Dataproc API client for Node.js", - "version": "5.10.0", + "version": "5.11.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json index 6ca46b4ed6c..f9892a950ce 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata.google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "5.10.0", + "version": "5.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json index 7dabdfcba50..91f1783dec7 100644 --- a/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json +++ b/packages/google-cloud-dataproc/samples/generated/v1/snippet_metadata_google.cloud.dataproc.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dataproc", - "version": "5.10.0", + "version": "5.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dataproc/samples/package.json b/packages/google-cloud-dataproc/samples/package.json index 78ee11a2f97..052d07ebe07 100644 --- a/packages/google-cloud-dataproc/samples/package.json +++ b/packages/google-cloud-dataproc/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 600000" }, "dependencies": { - "@google-cloud/dataproc": "^5.10.0", + "@google-cloud/dataproc": "^5.11.0", "@google-cloud/storage": "^7.0.0" }, "devDependencies": { diff --git a/packages/google-cloud-deploy/CHANGELOG.md b/packages/google-cloud-deploy/CHANGELOG.md index a131d46cb9f..9bb4d7a610c 100644 --- a/packages/google-cloud-deploy/CHANGELOG.md +++ b/packages/google-cloud-deploy/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.1.0](https://github.com/googleapis/google-cloud-node/compare/deploy-v4.0.0...deploy-v4.1.0) (2024-10-10) + + +### Features + +* [deploy] added support for deploy policies ([#5717](https://github.com/googleapis/google-cloud-node/issues/5717)) ([8d51ea3](https://github.com/googleapis/google-cloud-node/commit/8d51ea34e6efd1e88e0394b8e8d9dadf1a37c406)) + ## [4.0.0](https://github.com/googleapis/google-cloud-node/compare/deploy-v3.8.0...deploy-v4.0.0) (2024-08-09) diff --git a/packages/google-cloud-deploy/package.json b/packages/google-cloud-deploy/package.json index f5e0a93545e..09c15addfb0 100644 --- a/packages/google-cloud-deploy/package.json +++ b/packages/google-cloud-deploy/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/deploy", - "version": "4.0.0", + "version": "4.1.0", "description": "clouddeploy client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json index 890b46c25c7..b4ef526a4b7 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata.google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json index 74684abc379..452762c5817 100644 --- a/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json +++ b/packages/google-cloud-deploy/samples/generated/v1/snippet_metadata_google.cloud.deploy.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-deploy", - "version": "4.0.0", + "version": "4.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-deploy/samples/package.json b/packages/google-cloud-deploy/samples/package.json index ff6f3f9aa43..a3bc2e388d6 100644 --- a/packages/google-cloud-deploy/samples/package.json +++ b/packages/google-cloud-deploy/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha --timeout 600000 test/*.js" }, "dependencies": { - "@google-cloud/deploy": "^4.0.0" + "@google-cloud/deploy": "^4.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-dialogflow/CHANGELOG.md b/packages/google-cloud-dialogflow/CHANGELOG.md index a2bbda9d000..24c1fe112cc 100644 --- a/packages/google-cloud-dialogflow/CHANGELOG.md +++ b/packages/google-cloud-dialogflow/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/dialogflow?activeTab=versions +## [6.10.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v6.9.0...dialogflow-v6.10.0) (2024-10-10) + + +### Features + +* [dialogflow] created new boolean fields in conversation dataset for zone isolation and zone separation compliance status ([#5710](https://github.com/googleapis/google-cloud-node/issues/5710)) ([fd737ec](https://github.com/googleapis/google-cloud-node/commit/fd737ecc5e6681fbd97d7a20e39cbbdb4ec0595a)) + ## [6.9.0](https://github.com/googleapis/google-cloud-node/compare/dialogflow-v6.8.0...dialogflow-v6.9.0) (2024-09-24) diff --git a/packages/google-cloud-dialogflow/package.json b/packages/google-cloud-dialogflow/package.json index 5b151a7219d..e06eb54e76b 100644 --- a/packages/google-cloud-dialogflow/package.json +++ b/packages/google-cloud-dialogflow/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/dialogflow", "description": "Dialogflow API client for Node.js", - "version": "6.9.0", + "version": "6.10.0", "license": "Apache-2.0", "author": "Google LLC", "engines": { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json index 28889e7b6db..bee4e417b73 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata.google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.9.0", + "version": "6.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json index 6c4cc22e91b..f03cf55b16d 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2/snippet_metadata_google.cloud.dialogflow.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.9.0", + "version": "6.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json index e8a41a20d1e..4aa08a4e0e7 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata.google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.9.0", + "version": "6.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json index c4da7aae509..9030f6306cd 100644 --- a/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json +++ b/packages/google-cloud-dialogflow/samples/generated/v2beta1/snippet_metadata_google.cloud.dialogflow.v2beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-dialogflow", - "version": "6.9.0", + "version": "6.10.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-dialogflow/samples/package.json b/packages/google-cloud-dialogflow/samples/package.json index 3b1f02acd9e..d266b7c0aaa 100644 --- a/packages/google-cloud-dialogflow/samples/package.json +++ b/packages/google-cloud-dialogflow/samples/package.json @@ -15,7 +15,7 @@ "test": "mocha test --timeout=600000" }, "dependencies": { - "@google-cloud/dialogflow": "^6.9.0", + "@google-cloud/dialogflow": "^6.10.0", "pb-util": "^1.0.0", "uuid": "^9.0.0", "yargs": "^17.0.0" diff --git a/packages/google-cloud-documentai/CHANGELOG.md b/packages/google-cloud-documentai/CHANGELOG.md index 1c4427606f9..b47a278f42b 100644 --- a/packages/google-cloud-documentai/CHANGELOG.md +++ b/packages/google-cloud-documentai/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [8.11.0](https://github.com/googleapis/google-cloud-node/compare/documentai-v8.10.0...documentai-v8.11.0) (2024-10-10) + + +### Features + +* [documentai] Removed deprecated api versions ([#5735](https://github.com/googleapis/google-cloud-node/issues/5735)) ([05a5acf](https://github.com/googleapis/google-cloud-node/commit/05a5acff50e5fe8cf9d1806dee652d522c88a206)) + ## [8.10.0](https://github.com/googleapis/google-cloud-node/compare/documentai-v8.9.0...documentai-v8.10.0) (2024-09-13) diff --git a/packages/google-cloud-documentai/package.json b/packages/google-cloud-documentai/package.json index 74811243689..c87b2a2af6f 100644 --- a/packages/google-cloud-documentai/package.json +++ b/packages/google-cloud-documentai/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/documentai", - "version": "8.10.0", + "version": "8.11.0", "description": "Document AI client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json index 3ddd81a00de..b4acc2bb246 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata.google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json index e541166ac07..86ee24eaee2 100644 --- a/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json +++ b/packages/google-cloud-documentai/samples/generated/v1/snippet_metadata_google.cloud.documentai.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json index f2e1ff29c82..317683402d0 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata.google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json index f2e1ff29c82..317683402d0 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta1/snippet_metadata_google.cloud.documentai.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json index 4229b2e3e5f..19444cf9bd2 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata.google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json index 4229b2e3e5f..19444cf9bd2 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta2/snippet_metadata_google.cloud.documentai.v1beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json index 93d2b79e55a..437e9760aa7 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata.google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json index f45f4704921..92253195663 100644 --- a/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json +++ b/packages/google-cloud-documentai/samples/generated/v1beta3/snippet_metadata_google.cloud.documentai.v1beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-documentai", - "version": "8.10.0", + "version": "8.11.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-documentai/samples/package.json b/packages/google-cloud-documentai/samples/package.json index 9ef86a0dca5..4311a68d3b9 100644 --- a/packages/google-cloud-documentai/samples/package.json +++ b/packages/google-cloud-documentai/samples/package.json @@ -13,7 +13,7 @@ "test": "mocha test/*.js --timeout 600000" }, "dependencies": { - "@google-cloud/documentai": "^8.10.0", + "@google-cloud/documentai": "^8.11.0", "@google-cloud/storage": "^7.0.0", "p-queue": "^8.0.0", "uuid": "^9.0.0" diff --git a/packages/google-cloud-oracledatabase/CHANGELOG.md b/packages/google-cloud-oracledatabase/CHANGELOG.md new file mode 100644 index 00000000000..65619d90069 --- /dev/null +++ b/packages/google-cloud-oracledatabase/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 0.1.0 (2024-10-10) + + +### Features + +* [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5351](https://github.com/googleapis/google-cloud-node/issues/5351)) ([01f48fc](https://github.com/googleapis/google-cloud-node/commit/01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372)) +* [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5354](https://github.com/googleapis/google-cloud-node/issues/5354)) ([a9784ed](https://github.com/googleapis/google-cloud-node/commit/a9784ed3db6ee96d171762308bbbcd57390b6866)) +* Add initial files for google.cloud.oracledatabase.v1 ([#5727](https://github.com/googleapis/google-cloud-node/issues/5727)) ([73973c4](https://github.com/googleapis/google-cloud-node/commit/73973c441885b512790a6a4f6c9a37a09ca8e60c)) diff --git a/packages/google-cloud-oracledatabase/package.json b/packages/google-cloud-oracledatabase/package.json index 7b3dc8cb960..7d1a4c28ad3 100644 --- a/packages/google-cloud-oracledatabase/package.json +++ b/packages/google-cloud-oracledatabase/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/oracledatabase", - "version": "0.0.0", + "version": "0.1.0", "description": "Oracle Database@Google Cloud API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json b/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json index b6f3efcc6e9..8b11e4a9741 100644 --- a/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json +++ b/packages/google-cloud-oracledatabase/samples/generated/v1/snippet_metadata_google.cloud.oracledatabase.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-oracledatabase", - "version": "0.0.0", + "version": "0.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-oracledatabase/samples/package.json b/packages/google-cloud-oracledatabase/samples/package.json index f4fa61ebe5d..f0945416cb9 100644 --- a/packages/google-cloud-oracledatabase/samples/package.json +++ b/packages/google-cloud-oracledatabase/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-cloud/oracledatabase": "0.0.0" + "@google-cloud/oracledatabase": "^0.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-cloud-retail/CHANGELOG.md b/packages/google-cloud-retail/CHANGELOG.md index 6ab21ba7a8d..7fb9a59aada 100644 --- a/packages/google-cloud-retail/CHANGELOG.md +++ b/packages/google-cloud-retail/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [3.6.0](https://github.com/googleapis/google-cloud-node/compare/retail-v3.5.0...retail-v3.6.0) (2024-10-10) + + +### Features + +* [retail] add conversational search ([#5740](https://github.com/googleapis/google-cloud-node/issues/5740)) ([1a182cc](https://github.com/googleapis/google-cloud-node/commit/1a182cc261b9df04154dfeb123196a539fd25129)) + ## [3.5.0](https://github.com/googleapis/google-cloud-node/compare/retail-v3.4.0...retail-v3.5.0) (2024-06-21) diff --git a/packages/google-cloud-retail/package.json b/packages/google-cloud-retail/package.json index d375bd06681..bd4e61fb878 100644 --- a/packages/google-cloud-retail/package.json +++ b/packages/google-cloud-retail/package.json @@ -1,6 +1,6 @@ { "name": "@google-cloud/retail", - "version": "3.5.0", + "version": "3.6.0", "description": "Retail client for Node.js", "repository": { "type": "git", diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json index a1e2821ae0e..957de7fba6b 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata.google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json index 3c9d7a56199..8af75d48bc3 100644 --- a/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json +++ b/packages/google-cloud-retail/samples/generated/v2/snippet_metadata_google.cloud.retail.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json index 7089b5a7277..d27d452d13f 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata.google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json index e8d43361b4f..3ac47cb91bf 100644 --- a/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json +++ b/packages/google-cloud-retail/samples/generated/v2alpha/snippet_metadata_google.cloud.retail.v2alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json index 5f10a3fb35c..40b82963dc1 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata.google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json index 3f49b7a0716..6289121e2bc 100644 --- a/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json +++ b/packages/google-cloud-retail/samples/generated/v2beta/snippet_metadata_google.cloud.retail.v2beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-retail", - "version": "3.5.0", + "version": "3.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-retail/samples/package.json b/packages/google-cloud-retail/samples/package.json index b8deb3800c7..1533ce638df 100644 --- a/packages/google-cloud-retail/samples/package.json +++ b/packages/google-cloud-retail/samples/package.json @@ -13,7 +13,7 @@ "test": "c8 mocha" }, "dependencies": { - "@google-cloud/retail": "^3.5.0", + "@google-cloud/retail": "^3.6.0", "@google-cloud/bigquery": "^7.0.0", "@google-cloud/storage": "^7.0.0" }, diff --git a/packages/google-cloud-tasks/CHANGELOG.md b/packages/google-cloud-tasks/CHANGELOG.md index 5cd08fe0acb..af0884ddc85 100644 --- a/packages/google-cloud-tasks/CHANGELOG.md +++ b/packages/google-cloud-tasks/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/nodejs-tasks?activeTab=versions +## [5.5.1](https://github.com/googleapis/google-cloud-node/compare/tasks-v5.5.0...tasks-v5.5.1) (2024-10-10) + + +### Bug Fixes + +* Remove extra protos file ([#5696](https://github.com/googleapis/google-cloud-node/issues/5696)) ([4676845](https://github.com/googleapis/google-cloud-node/commit/4676845917595486602363397352b393eedc587a)) + ## [5.5.0](https://github.com/googleapis/google-cloud-node/compare/tasks-v5.4.0...tasks-v5.5.0) (2024-07-22) diff --git a/packages/google-cloud-tasks/package.json b/packages/google-cloud-tasks/package.json index 5405ca21b2e..0cd3a09a46d 100644 --- a/packages/google-cloud-tasks/package.json +++ b/packages/google-cloud-tasks/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/tasks", "description": "Cloud Tasks API client for Node.js", - "version": "5.5.0", + "version": "5.5.1", "license": "Apache-2.0", "author": "Google LLC", "repository": { diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json index 19485cad832..87246a97918 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata.google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json index 19485cad832..87246a97918 100644 --- a/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json +++ b/packages/google-cloud-tasks/samples/generated/v2/snippet_metadata_google.cloud.tasks.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json index c8dea0f37d1..4b052254738 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata.google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json index e8ffc3ae173..63835335f23 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta2/snippet_metadata_google.cloud.tasks.v2beta2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json index 7922f480f56..d87a79205b9 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata.google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json index 1332f5871a6..8a0c8ae8541 100644 --- a/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json +++ b/packages/google-cloud-tasks/samples/generated/v2beta3/snippet_metadata_google.cloud.tasks.v2beta3.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-tasks", - "version": "5.5.0", + "version": "5.5.1", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-cloud-tasks/samples/package.json b/packages/google-cloud-tasks/samples/package.json index d04ed657ce8..2e953e0e3f3 100644 --- a/packages/google-cloud-tasks/samples/package.json +++ b/packages/google-cloud-tasks/samples/package.json @@ -15,7 +15,7 @@ "start": "node server.js" }, "dependencies": { - "@google-cloud/tasks": "^5.5.0", + "@google-cloud/tasks": "^5.5.1", "body-parser": "^1.18.3", "express": "^4.16.3" }, diff --git a/packages/google-container/CHANGELOG.md b/packages/google-container/CHANGELOG.md index e5b77d0568e..fef8eaa841d 100644 --- a/packages/google-container/CHANGELOG.md +++ b/packages/google-container/CHANGELOG.md @@ -4,6 +4,13 @@ [1]: https://www.npmjs.com/package/@google-cloud/container?activeTab=versions +## [5.18.0](https://github.com/googleapis/google-cloud-node/compare/container-v5.17.0...container-v5.18.0) (2024-10-10) + + +### Features + +* [container] add an effective_cgroup_mode field in node config ([#5741](https://github.com/googleapis/google-cloud-node/issues/5741)) ([88083e4](https://github.com/googleapis/google-cloud-node/commit/88083e4a879ef6963eca9183c037ef84b861efed)) + ## [5.17.0](https://github.com/googleapis/google-cloud-node/compare/container-v5.16.0...container-v5.17.0) (2024-08-29) diff --git a/packages/google-container/package.json b/packages/google-container/package.json index c0ce50e0893..7e27b310fb2 100644 --- a/packages/google-container/package.json +++ b/packages/google-container/package.json @@ -1,7 +1,7 @@ { "name": "@google-cloud/container", "description": "Google Container Engine API client for Node.js", - "version": "5.17.0", + "version": "5.18.0", "license": "Apache-2.0", "author": "Google Inc", "engines": { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json index 5550d811749..0309a89af28 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata.google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.17.0", + "version": "5.18.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json index d168af320c5..ea92dc988ba 100644 --- a/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json +++ b/packages/google-container/samples/generated/v1/snippet_metadata_google.container.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.17.0", + "version": "5.18.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json index c471db4b4f4..5827ef02044 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata.google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.17.0", + "version": "5.18.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json index 0f312e5c91d..de3fef74a90 100644 --- a/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json +++ b/packages/google-container/samples/generated/v1beta1/snippet_metadata_google.container.v1beta1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-container", - "version": "5.17.0", + "version": "5.18.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-container/samples/package.json b/packages/google-container/samples/package.json index aa7223ab1f6..ee65f21e84b 100644 --- a/packages/google-container/samples/package.json +++ b/packages/google-container/samples/package.json @@ -14,7 +14,7 @@ "test": "mocha test --timeout 1000000" }, "dependencies": { - "@google-cloud/container": "^5.17.0", + "@google-cloud/container": "^5.18.0", "uuid": "^9.0.0" }, "devDependencies": { diff --git a/packages/google-devtools-cloudbuild/CHANGELOG.md b/packages/google-devtools-cloudbuild/CHANGELOG.md index 805ac872d86..553f161cf8e 100644 --- a/packages/google-devtools-cloudbuild/CHANGELOG.md +++ b/packages/google-devtools-cloudbuild/CHANGELOG.md @@ -1,5 +1,12 @@ # Changelog +## [4.6.0](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v4.5.0...cloudbuild-v4.6.0) (2024-10-10) + + +### Features + +* [cloudbuild] Add LEGACY_BUCKET option to DefaultLogsBucketBehavior ([#5700](https://github.com/googleapis/google-cloud-node/issues/5700)) ([7cbf6b2](https://github.com/googleapis/google-cloud-node/commit/7cbf6b20d0e4944779ba71aaa3388abbf3840ed5)) + ## [4.5.0](https://github.com/googleapis/google-cloud-node/compare/cloudbuild-v4.4.0...cloudbuild-v4.5.0) (2024-05-21) diff --git a/packages/google-devtools-cloudbuild/README.md b/packages/google-devtools-cloudbuild/README.md index e0175b64579..e618877c773 100644 --- a/packages/google-devtools-cloudbuild/README.md +++ b/packages/google-devtools-cloudbuild/README.md @@ -44,7 +44,7 @@ Google APIs Client Libraries, in [Client Libraries Explained][explained]. 1. [Select or create a Cloud Platform project][projects]. 1. [Enable billing for your project][billing]. 1. [Enable the Cloud Build API][enable_api]. -1. [Set up authentication with a service account][auth] so you can access the +1. [Set up authentication][auth] so you can access the API from your local workstation. ### Installing the client library @@ -214,4 +214,4 @@ See [LICENSE](https://github.com/googleapis/google-cloud-node/blob/main/LICENSE) [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=cloudbuild.googleapis.com -[auth]: https://cloud.google.com/docs/authentication/getting-started +[auth]: https://cloud.google.com/docs/authentication/external/set-up-adc-local diff --git a/packages/google-devtools-cloudbuild/package.json b/packages/google-devtools-cloudbuild/package.json index 0b73aaa0c4e..de8f872ef47 100644 --- a/packages/google-devtools-cloudbuild/package.json +++ b/packages/google-devtools-cloudbuild/package.json @@ -5,7 +5,7 @@ "url": "https://github.com/googleapis/google-cloud-node.git" }, "name": "@google-cloud/cloudbuild", - "version": "4.5.0", + "version": "4.6.0", "author": "Google LLC", "description": "Cloud Build API client for Node.js", "main": "build/src/index.js", diff --git a/packages/google-devtools-cloudbuild/protos/protos.json b/packages/google-devtools-cloudbuild/protos/protos.json index bdecefe7862..74ab3d01157 100644 --- a/packages/google-devtools-cloudbuild/protos/protos.json +++ b/packages/google-devtools-cloudbuild/protos/protos.json @@ -1,4 +1,7 @@ { + "options": { + "syntax": "proto3" + }, "nested": { "google": { "nested": { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json index 5cc758d9da8..29b657caa86 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata.google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.5.0", + "version": "4.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json index 8cd579e9391..3239e4ec82f 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v1/snippet_metadata_google.devtools.cloudbuild.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.5.0", + "version": "4.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json index a0f8623b2b7..136c8f38d6b 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata.google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.5.0", + "version": "4.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json index a0f8623b2b7..136c8f38d6b 100644 --- a/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json +++ b/packages/google-devtools-cloudbuild/samples/generated/v2/snippet_metadata_google.devtools.cloudbuild.v2.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-cloudbuild", - "version": "4.5.0", + "version": "4.6.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-devtools-cloudbuild/samples/package.json b/packages/google-devtools-cloudbuild/samples/package.json index 8dd0d6920a7..38d23cb8dbb 100644 --- a/packages/google-devtools-cloudbuild/samples/package.json +++ b/packages/google-devtools-cloudbuild/samples/package.json @@ -15,7 +15,7 @@ "test": "c8 mocha test --timeout=800000" }, "dependencies": { - "@google-cloud/cloudbuild": "^4.5.0" + "@google-cloud/cloudbuild": "^4.6.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-maps-routeoptimization/CHANGELOG.md b/packages/google-maps-routeoptimization/CHANGELOG.md index 360f24b0f0c..178e8d6b524 100644 --- a/packages/google-maps-routeoptimization/CHANGELOG.md +++ b/packages/google-maps-routeoptimization/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.3.0](https://github.com/googleapis/google-cloud-node/compare/routeoptimization-v0.2.0...routeoptimization-v0.3.0) (2024-10-10) + + +### Features + +* [routeoptimization] Add support for generating route tokens ([#5706](https://github.com/googleapis/google-cloud-node/issues/5706)) ([ade97ed](https://github.com/googleapis/google-cloud-node/commit/ade97eddd23ffa8e89526221b564c0eacd3b078e)) +* A new field `route_token` is added to message `.google.maps.routeoptimization.v1.ShipmentRoute.Transition` ([ade97ed](https://github.com/googleapis/google-cloud-node/commit/ade97eddd23ffa8e89526221b564c0eacd3b078e)) + ## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/routeoptimization-v0.1.0...routeoptimization-v0.2.0) (2024-09-24) diff --git a/packages/google-maps-routeoptimization/package.json b/packages/google-maps-routeoptimization/package.json index cec6670e0b4..cea343205a4 100644 --- a/packages/google-maps-routeoptimization/package.json +++ b/packages/google-maps-routeoptimization/package.json @@ -1,6 +1,6 @@ { "name": "@googlemaps/routeoptimization", - "version": "0.2.0", + "version": "0.3.0", "description": "Route Optimization API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json b/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json index 8ff8518e330..50c6e7ee0f1 100644 --- a/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json +++ b/packages/google-maps-routeoptimization/samples/generated/v1/snippet_metadata_google.maps.routeoptimization.v1.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-routeoptimization", - "version": "0.2.0", + "version": "0.3.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-maps-routeoptimization/samples/package.json b/packages/google-maps-routeoptimization/samples/package.json index c1281cd9ea2..f926761a981 100644 --- a/packages/google-maps-routeoptimization/samples/package.json +++ b/packages/google-maps-routeoptimization/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@googlemaps/routeoptimization": "^0.2.0" + "@googlemaps/routeoptimization": "^0.3.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-marketingplatform-admin/CHANGELOG.md b/packages/google-marketingplatform-admin/CHANGELOG.md new file mode 100644 index 00000000000..da6ba7bb3bd --- /dev/null +++ b/packages/google-marketingplatform-admin/CHANGELOG.md @@ -0,0 +1,10 @@ +# Changelog + +## 0.1.0 (2024-10-10) + + +### Features + +* [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5351](https://github.com/googleapis/google-cloud-node/issues/5351)) ([01f48fc](https://github.com/googleapis/google-cloud-node/commit/01f48fce63ec4ddf801d59ee2b8c0db9f6fb8372)) +* [Many APIs] update Nodejs generator to send API versions in headers for GAPICs ([#5354](https://github.com/googleapis/google-cloud-node/issues/5354)) ([a9784ed](https://github.com/googleapis/google-cloud-node/commit/a9784ed3db6ee96d171762308bbbcd57390b6866)) +* Add initial files for google.marketingplatform.admin.v1alpha ([#5716](https://github.com/googleapis/google-cloud-node/issues/5716)) ([38b4646](https://github.com/googleapis/google-cloud-node/commit/38b46462a436347327f56c81ea3ae8dcbada1c14)) diff --git a/packages/google-marketingplatform-admin/package.json b/packages/google-marketingplatform-admin/package.json index 1c9a21102be..e8b860260c2 100644 --- a/packages/google-marketingplatform-admin/package.json +++ b/packages/google-marketingplatform-admin/package.json @@ -1,6 +1,6 @@ { "name": "@google-ads/marketing-platform-admin", - "version": "0.0.0", + "version": "0.1.0", "description": "Google Marketing Platform Admin API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json index c3d1f856eed..9eeeb4e6d94 100644 --- a/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json +++ b/packages/google-marketingplatform-admin/samples/generated/v1alpha/snippet_metadata_google.marketingplatform.admin.v1alpha.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-admin", - "version": "0.0.0", + "version": "0.1.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-marketingplatform-admin/samples/package.json b/packages/google-marketingplatform-admin/samples/package.json index 93d6ded2cd3..dccae9a7a15 100644 --- a/packages/google-marketingplatform-admin/samples/package.json +++ b/packages/google-marketingplatform-admin/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-ads/marketing-platform-admin": "0.0.0" + "@google-ads/marketing-platform-admin": "^0.1.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-shopping-merchant-accounts/CHANGELOG.md b/packages/google-shopping-merchant-accounts/CHANGELOG.md index 4774b8f7c5a..f101578ef1a 100644 --- a/packages/google-shopping-merchant-accounts/CHANGELOG.md +++ b/packages/google-shopping-merchant-accounts/CHANGELOG.md @@ -1,5 +1,21 @@ # Changelog +## [1.0.0](https://github.com/googleapis/google-cloud-node/compare/accounts-v0.1.0...accounts-v1.0.0) (2024-10-10) + + +### ⚠ BREAKING CHANGES + +* [merchantapi] The type of an existing field `time_zone` is changed from `message` to `string` in message `.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest` ([#5714](https://github.com/googleapis/google-cloud-node/issues/5714)) + +### Features + +* [merchantapi] add 'force' parameter for accounts.delete method ([#5720](https://github.com/googleapis/google-cloud-node/issues/5720)) ([e3ff2cc](https://github.com/googleapis/google-cloud-node/commit/e3ff2cc87bbfd68621de91c43e7e90d1248c194d)) + + +### Bug Fixes + +* [merchantapi] The type of an existing field `time_zone` is changed from `message` to `string` in message `.google.shopping.merchant.accounts.v1beta.ListAccountIssuesRequest` ([#5714](https://github.com/googleapis/google-cloud-node/issues/5714)) ([8928489](https://github.com/googleapis/google-cloud-node/commit/8928489a31a942397429023dca61da026522856a)) + ## 0.1.0 (2024-07-22) diff --git a/packages/google-shopping-merchant-accounts/package.json b/packages/google-shopping-merchant-accounts/package.json index 4b5d0f05c45..3b58b635421 100644 --- a/packages/google-shopping-merchant-accounts/package.json +++ b/packages/google-shopping-merchant-accounts/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/accounts", - "version": "0.1.0", + "version": "1.0.0", "description": "Merchant API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json index ed267551abd..8874979810c 100644 --- a/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json +++ b/packages/google-shopping-merchant-accounts/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.accounts.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-accounts", - "version": "0.1.0", + "version": "1.0.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-accounts/samples/package.json b/packages/google-shopping-merchant-accounts/samples/package.json index d839a4d1a81..7b451bfaedc 100644 --- a/packages/google-shopping-merchant-accounts/samples/package.json +++ b/packages/google-shopping-merchant-accounts/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/accounts": "^0.1.0" + "@google-shopping/accounts": "^1.0.0" }, "devDependencies": { "c8": "^9.0.0", diff --git a/packages/google-shopping-merchant-datasources/CHANGELOG.md b/packages/google-shopping-merchant-datasources/CHANGELOG.md index 7228a57f75b..774468d9f3d 100644 --- a/packages/google-shopping-merchant-datasources/CHANGELOG.md +++ b/packages/google-shopping-merchant-datasources/CHANGELOG.md @@ -1,5 +1,13 @@ # Changelog +## [0.2.0](https://github.com/googleapis/google-cloud-node/compare/datasources-v0.1.0...datasources-v0.2.0) (2024-10-10) + + +### Features + +* [merchantapi] Add FileUploads service ([#5711](https://github.com/googleapis/google-cloud-node/issues/5711)) ([667316b](https://github.com/googleapis/google-cloud-node/commit/667316b70270f59b10cfb41c687ef9375b683f53)) +* [merchantapi] adding some more information about supplemental data sources ([#5733](https://github.com/googleapis/google-cloud-node/issues/5733)) ([3a101aa](https://github.com/googleapis/google-cloud-node/commit/3a101aaf6fa743f4f0854973b7a22202fef29f0f)) + ## 0.1.0 (2024-06-05) diff --git a/packages/google-shopping-merchant-datasources/package.json b/packages/google-shopping-merchant-datasources/package.json index bc1d7ff8611..f08ffe7b3cc 100644 --- a/packages/google-shopping-merchant-datasources/package.json +++ b/packages/google-shopping-merchant-datasources/package.json @@ -1,6 +1,6 @@ { "name": "@google-shopping/datasources", - "version": "0.1.0", + "version": "0.2.0", "description": "Merchant API client for Node.js", "repository": { "type": "git", diff --git a/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json b/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json index 138c64faa0f..dcdabd638c0 100644 --- a/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json +++ b/packages/google-shopping-merchant-datasources/samples/generated/v1beta/snippet_metadata_google.shopping.merchant.datasources.v1beta.json @@ -1,7 +1,7 @@ { "clientLibrary": { "name": "nodejs-datasources", - "version": "0.1.0", + "version": "0.2.0", "language": "TYPESCRIPT", "apis": [ { diff --git a/packages/google-shopping-merchant-datasources/samples/package.json b/packages/google-shopping-merchant-datasources/samples/package.json index 76abf94d3f2..276d7b5b491 100644 --- a/packages/google-shopping-merchant-datasources/samples/package.json +++ b/packages/google-shopping-merchant-datasources/samples/package.json @@ -14,7 +14,7 @@ "publish": "echo 'sample test; do not publish'" }, "dependencies": { - "@google-shopping/datasources": "^0.1.0" + "@google-shopping/datasources": "^0.2.0" }, "devDependencies": { "c8": "^9.0.0",